Go to the first, previous, next, last section, table of contents.


Automating xdvi startup from emacs/AucTeX

If you are using AucTeX and emacs, then by putting some additional lines in the tex-site.el file it is possible to make emacs automatically invoke xdvipresent with the right parameters when doing C-c C-c View or C-c C-c Print. The selection will be based automatically on the presentation option (vga, svga, xga, sun, a4paper, letterpaper, ...) that you are using in the documentclass line in the latex file (if you change this you will have to delete the buffer and open the file again for emacs to notice the changes.

These are examples of the entries that you may want to add to the tex-site.el file:

(defvar TeX-view-style '(
    ;; xdvipresent entries
    ("^sun$" "xdvipresent sun %d")
    ("^xga$" "xdvipresent xga %d")
    ("^svga$" "xdvipresent svga %d")
    ("^vga$" "xdvipresent vga %d")
    ("^a4paper$" "xdvipresent a4paper %d")
    ("^letterpaper$" "xdvipresent letterpaper %d")
    ;;
    ("^landscape$" "xdvi %d -paper a4r -s 4")
    ("^a5$" "xdvi %d -paper a5")
    ("." "xdvi %d -s 7 -hushspecials -hl green -bd red -cr blue
         -expert -paper a4 -geometry -0+0")
    )

(Note that if you are indeed an emacs/AucTex user you could also simply copy the xdvi commands with the right parameters from the xdvipresent script into this file and not use the xdvipresent script at all!)

In a portable, and running a window manager that supports several work surfaces, such as fvwm, it is convenient to start the xdvi in an adjacent work surface. These are examples:

(defvar TeX-view-style '(
    ;; xdvipresent entries
    ("^sun$" "xdvipresent sun %d -geometry 1014x758+0+900")
    ("^xga$" "xdvipresent xga %d -geometry 1014x758+0+768")
    ("^svga$" "xdvipresent svga %d -geometry 790x590+0+1024")
    ("^vga$" "xdvipresent vga %d -geometry 630x470+0+800")
    ("^a4paper$" "xdvipresent a4paper %d")
    ("^letterpaper$" "xdvipresent letterpaper %d")
    ;;
    ("^landscape$" "xdvi %d -paper a4r -s 4")
    ("^a5$" "xdvi %d -paper a5")
    ("." "xdvi %d -s 7 -hushspecials -hl green -bd red -cr blue
          -expert -paper a4 -geometry -0+0")
    )

In your .emacs file you should put something like:

  ;; Auc-TeX
  (setq load-path (cons "....../auctex-9.6" load-path))
  (load "tex-site")
  (setq-default TeX-parse-self t) ;; Forces parsing of options in file!


Go to the first, previous, next, last section, table of contents.