Kile-Src-Specials-HOWTO

Introduction

Source-specials is a way to relate places in a DVI file to corresponding places in a TeX file. It enables you to click on a spot in the DVI file and have your editor jump to the corresponding place in the TeX file, or vice versa. Your editor and your viewer need to be configured in order to do so. This HOWTO explains how to enable source-specials in LaTeX, how to use some DVI viewers to point an editor to the right place, and how to put this all to use in the Kile and Emacs environments.

Enabling Source Specials in LaTeX

You can start LaTeX with the option -src-specials in order to have source specials available in the DVI file.

Using Source Specials in Xdvi

When reading a DVI file with source specials, Xdvi needs some options in order to tell your editor where to jump. You can start it like this: xdvi -editor 'editor' dvi-file where you replace 'editor' with the appropriate command.

Putting it all together in Kile

In Kile, making this work involved three steps:

Make LaTeX use source specials

  1. After starting Kile, click "Settings", then "Configure Kile"
  2. In the "Configure- Kile" windows, click on the "Build" icon in the column on the left of the window
  3. In the "Select a tool" list, click "LaTeX"
  4. The line named "Command" should say something like "latex"
  5. The line named "Options" should say something like "-src-specials -interaction=nonstopmode '%source'". The important part here is the -src-specials, but you may have used your own options to tune it.
  6. Click "OK"

Enable jumping from the LaTeX file to the appropriate area in the DVI file

If you use the embedded viewer, you don't need to do anything. I do not know how to enable this feature for Xdvi.

Enable jumping back from the embedded dvi viewer to the right line in the LaTeX file

There is no need to configure anything here.

Enable jumping back from Xdvi to the corresponding line in the LaTeX file

  1. After starting Kile, click "Settings", then "Configure Kile"
  2. In the "Configure- Kile" window, click on the "Build" icon in the column on the left of the window
  3. In the "Select a tool" list, click "ViewDVI"
  4. In the "Select a Configuration" menu, use "KDVI"
  5. The "Command" line should say: "xdvi"
  6. The "Options" line should say: "-editor "kile --line %l %f" '%target'"
  7. Click "OK"

Putting it all together in Emacs


Last modified: Wed Jun 22 13:33:56 CEST 2005