[Top][All Lists]

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

[AUCTeX] Re: Running LaTex without confirming

From: Stefan Reichör
Subject: [AUCTeX] Re: Running LaTex without confirming
Date: Thu, 30 Oct 2008 08:27:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Simao M" <address@hidden> writes:

> Hello,
> Does anyone know if it is possible to run latex without confirming?
> I mean, I type C-c C-c and I don't want to confirm my options because
> I already know they are right. I just want to type C-c C-c and see my
> pdf file.

I use the code below. The string given to tex-build-command-function is
the string you need to enter on the command prompt:

(defun tex-build-command-function (cmd &optional recenter-output-buffer 
save-buffer override-confirm)
  "Build a TeX-command function."
   (` (lambda()
        (when (, save-buffer) (save-buffer))
        (when (, recenter-output-buffer) (TeX-recenter-output-buffer nil))
        (TeX-command (, cmd) 'TeX-master-file (if (, override-confirm) 1 -1)))))

(define-key LaTeX-mode-map [f6] (tex-build-command-function "LaTeX" nil t))
(define-key LaTeX-mode-map [(shift f6)] (tex-build-command-function "PdfLaTeX" 
t t))
(define-key LaTeX-mode-map [(super f6)] (tex-build-command-function "dviPS" t))
(when unixp (define-key LaTeX-mode-map [(meta f6)] (tex-build-command-function 
"dviPS" t)))

(define-key LaTeX-mode-map [(super control f6)] (tex-build-command-function 
"dviPS landscape" t))
(define-key LaTeX-mode-map [(super meta f6)] (tex-build-command-function 
"PS2pdf" t))
(define-key LaTeX-mode-map [(shift f8)] (tex-build-command-function (if win32p 
"YAP" "View") nil))
(define-key LaTeX-mode-map [(super f8)] (tex-build-command-function "Ghostview" 
(define-key LaTeX-mode-map [(super meta f8)] (tex-build-command-function "View 
PDF" nil))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]