Why use kile?
Kile has many useful features. Some of my favourites include:
- Auto-complete of LaTeX commands including environments
- One-click compilation of LaTeX document to pdf
- Document structure tree
- Auto-complete of your document’s labels
There are other things that I don’t use as well, like preview and the ability to choose commands from menus.
Kile can usually be installed via your distribution’s package manager. As it is part of KDE, it relies on the Qt libraries, and may not look quite as good if you are using a GTK based desktop environment. The package name is normally just “kile”.
It will install some form of LaTeX as a dependency but this may be a minimal install. I recommend also installing a full LaTeX distribution through your package manager as well. This is so you have access to all the features of LaTeX. Personally I use TeX Live and install on Arch Linux via the metapackage “texlive-most”. This installs all the features that I use regularly.
Kile should auto-complete things by default after you type the first three letters. If it doesn’t, make sure you check the box in the settings.
I have the Quick Build button configured to run the standard pdflatex process:
which makes sure all labels and references are correct.
Using reverse search
Kile supports forward search and reverse search. Forward search is when you have your cursor in the LaTeX source in the Kile editor, and click forward search, it opens the pdf and puts the view straight to the part where your cursor was. Reverse search is where you shift click on the pdf and it opens Kile and puts the cursor in the line of the source where you clicked in the pdf. This is very useful for proof reading and editing.
To use this, you first need to set the pdflatex and latex versions to “modern” in the build options. Then you need to go into your pdf viewer (I use the KDE default, Okular) and make sure that the editor is listed as Kile.
Using pdflatex with psfrag
The details of this have been dealt with in a previous post. Here I just want to tell you how to configure Kile to support escape to shell. In the settings, build, choose the pdflatex tool. On the right, you probably chose modern at the top. It then has a text box of options, the
-synctex=1 option should already have been set from choosing modern. Add the
--shell-escape variable just after this. Your options should now look something like:
-synctex=1 --shell-escape -interaction=nonstopmode '%source'