The command Forward Search uses KDVI and an additional file (additional files are
referred to as packages in LATEX) called srcltx.sty
.
You will have to do a search of your files to check if your distribution has
scrltx.sty
included. If it is not included, you may
download it; copy it
to a TEX folder, for example /usr/share/texmf/tex/latex/srcltx/
, and
run texhash
so that LATEX will know its whereabouts.
Then you can set the following command in the preamble:
\documentclass[12pt, a4paper]{book}
\usepackage[active]{srcltx}
\pagestyle{empty}
\renewcommand{\baselinestretch}{2}
\begin{document}
\begin{verse}
The KDE \LaTeX\ source code editor Kile is my favorite.
\emph{Because} it is easy to use!
\end{verse}
\end{document}
Once you have added the package srcltx
, you can leave KDVI open.
To execute a forward search, position the cursor on a line of source code, and click
Kdvi Forward Search to jump to the associated position
in the DVI viewer window.
Inverse search cannot work unless:
srcltx.sty
is in use.
The source file has been compiled successfully.
KDVI knows which editor you would like to use.
With this feature of KDVI, a middle mouse click in the DVI document will have Kile open the corresponding TEX document and attempt to go to the corresponding line. Remember to tell KDVI to use Kile as a text editor, in KDVI's menu item ->.
If you are trying to use quickbuild, and the DVI viewer does not open, chances are you have an error. If you have an error, it will be visible in the log file / message area, and the summary of the error will be given.
The log file will explain the source of the error in your code. In the editor, you can use the buttons in the toolbar labeled and to jump to and from errors. The log file always states in which line the error occurred. To view the line where an error occurred, click on the error in the log window, and Kile will take you to its line.