June 14, 2005

latex and xdvi

I just learnt from a colleague about two really cool things. In practice they allow communication from your editor to xdvi and back again.

The first thing is that you can send a signal to xdvi (SIGUSR1) that will force it to reload a PDF. You can set up a Makefile (and bind it to a key in emacs) such that whenever you hit the key the latex source will be rebuilt and the signal sent to xdvi so that is displays the changes. This is communication from emacs to xdvi.

The second thing allows communication from xdvi to emacs. Apparently you can pass a flag to latex that will put source locations inside the generated dvi. Then, inside xdvi, you can control-click on figures to be taken back to the source location in emacs. This option is --src-specials.