Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!castle!egnr22 From: egnr22@castle.ed.ac.uk (M D Aylett) Newsgroups: comp.windows.x Subject: Re: xdvi in emacs Message-ID: Date: 24 May 91 21:16:10 GMT References: <1991May16.152416.17303@unibi.uni-bielefeld.de> Sender: news@castle.ed.ac.uk Followup-To: comp.windows.x Organization: University of Edinburgh, Physics Dept. Lines: 30 In-reply-to: boris@math10.uni-bielefeld.de's message of 16 May 91 15:24:16 GMT In article <1991May16.152416.17303@unibi.uni-bielefeld.de> boris@math10.uni-bielefeld.de (Boris Hemkemeier) writes: There is a nice feature in an X-window environment. If you are TeXing a text in emacs using TeX-mode and its commands like `TeX-buffer', you can get a preview with an emacs command. You have only to set the variable `TeX-dvi-print-command' to "xdvi". Then C-c C-p (`TeX-print') will produce a preview of the current buffer. Boris -- Boris Hemkemeier: boris@math10.uni-bielefeld.de This'll also do the job, but you don't have to keep changing TeX-dvi-print-command (defun TeX-xdvi() "Preview a TeX or LaTeX file by running /usr/.bin/X11/xdvi on the dvi file created with TeX-buffer or Tex-region. Only works with X windows!" (interactive) (if window-system (start-process "xdvi" "*xdvi*" "/usr/.bin/X11/xdvi" (concat TeX-directory TeX-zap-file ".dvi")))) (setq TeX-mode-hook '(lambda() (define-key TeX-mode-map "\C-c\C-v" 'TeX-xdvi))) Put these in your .emacs