[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Xemacs & latex



On Mon, 27 Sep 2004 14:31:50 +0200
v.demartino2@virgilio.it wrote:

> Under xemacs 21 it is possible to compile a latex file by issuing the command
> 'C-c C-r'. Unfortunately this runs the plain 'latex' command whilst I'd
> like to run 'pdflatex' (and also ConTeXt via texexec). 
> 
> How could I reach this result? 

The following (untested) code may work for you. The idea is to define a hook that adds extra options to the tex-commandlist, and assigns pdflatex as the default compile option. If it works then you will be able to do stuff like 

C-c C-c <enter>

(defun my-tex-mode-hook () (interactive)
  (add-to-list 'TeX-command-list (list "pdflatex" "pdflatex  %t" 'TeX-run-LaTeX nil t))
 (add-to-list 'TeX-command-list (list "pdfview" "acroread %s.pdf " 'TeX-run-background nil nil))
 (setq TeX-command-default '"pdflatex")
)
(add-hook 'TeX-mode-hook 'my-tex-mode-hook)


 


This will enable you to



Reply to: