This page is intended as a light introduction to the Kile LaTeX editor, and aims only to get you started. In particular, it is not intended to be an introduction to LaTeX: for resources on that, follow this link. Further information on Kile can be found in the Kile handbook, and users are strongly recommended to read through that.
Kile is immediately ready to start creating LaTeX documents; however, you should take the time to look over its configuration before you start using it heavily. From the menu, select Settings -> Configure Kile....
One of the first things you should do is enter your name in the Author box in the General tab.
If you wish, you can treat Kile simply as a text editor, opening up a blank file and beginning from scratch. However, through templates, Kile can reduce much of the workload in creating new tex files, and we shall explore this here.
A new document can be started in a number of ways:
In addition to the standard document templates that come with Kile, staff will notice that the standard UniS templates have also been provided.
For now, select the Article class. You will see a very simple latex template for an article come up. If you have filled in your name in the settings tab, then the \author command will automatically have your name there.
Compiliation of your document can be started in a number of ways:
If you have not already saved the file, you will be prompted to do so, otherwise, Kile will compile your document, returning a list of errors and warnings that the process may have given rise to.
If the document compiles cleanly (i.e. there are no errors) then you will be able to view the resultant DVI file in the DVI viewer: . To return to the text editor, either:
All the programs related to LaTeX document creation are laid out in the tool bar, starting with the latex button. For quick reference, they are listed below:
|View DVI file|
|Convert DVI to PS|
|View PS file|
|Create PDF file|
|View PDF file|
|Convert DVI to PDF|
|Convert PS to PDF|
|Create HTML file|
|View HTML file|
|Forward Search in DVI file|
It is often easier to deal with large LaTeX projects by creating multi-part documents where one overall master document calls upon other latex files via /input and /include. Kile is able to deal with these by allowing you to flag which file is a "Master document".
Suppose we have a master file called main.tex which incorporates the contents of section.tex. Opening up main.tex in Kile, we can set this as the master by going to the Settings menu and choosing Define Current Document as "Master Document".
If we were to now edit section1.tex and then hit the latex button, Kile knows to run latex not on the currently edited file but on the master document main.tex.
WARNING: Unless you tell it otherwise, Kile will always default to this master document when compiling, so if you start working on a wholly different document, please notify Kile immediately. To do so, go to Settings and choose Normal mode: the current master document will be indicated in parentheses.
Forward-searching allows a user to highlight a word in a LaTeX document and jump to its place in the associated DVI file at the touch of a button. Kile should automatically be configured to do this, via the forward search button: .
Inverse-searching is the reverse, allowing a user to middle-click on any word in a DVI file and jump straight back to its position in the latex source file. Once again, Kile should automatically be configured to do this. If you find that it does not open up the source files in the Kile editor, then, in the DVI viewer, click on Settings and choose Configure Kile.... A dialog box with only those settings relevant to the DVI viewer should appear. Click on DVI Specials and ensure Kile is chosen in the drop-down box.
Note that the inverse-search facility will also work with multi-part documents.
If you tend to work with a standard LaTeX preamble, then you can create your own template in Kile to reflect this.
Let us use the document main.tex as a new template for Kile. Ideally, this document should have nothing but a preamble, which calls upon some useful packages, unless you always include a standard piece of content (such as a disclaimer or license) in your work.
Our example document main.tex is not that empty, but can easily be corrected - simply highlight everything inside the document environment to delete it.
To use this as a template, simply select File -> Create Template From Document....
In the template creation dialog box you can choose both a name for your new template as well as an icon for easier recognition.
Now, whenever you open up the new document wizard, your new template will be listed as one of the options.