* Alan Ristow (2007-02-23) writes:
I've defined my ps2pdf command like this in my .emacs file:
--------------
;; Setup additional commands
(setq alan-tex-commands-extra
(list
(list "ps2pdf" "ps2pdf %s.ps && start %s.pdf" 'TeX-run-command
nil t :help "Generate PDF file")
))
;; Add the new commands to the command list
(require 'tex); need this to define TeX-command-list
(setq TeX-command-list (append TeX-command-list alan-tex-commands-extra))
--------------
The first question, I suppose, is whether the way I've done this is good
practice. It generates a PDF file just fine, so I know it works, I just
don't know if this is the best way to go about it.
It's better to do stuff like that with `eval-after-load' instead of
`require' because then tex.el(c) will only be loaded when you open a
LaTeX file and not right at the start of your Emacs session. Here is
what it could look like:
(eval-after-load "tex"
'(setq TeX-command-list
(append TeX-command-list
'(("ps2pdf" "ps2pdf %s.ps && start \"\" %s.pdf"
'TeX-run-command nil t :help "Generate PDF file")))))