"Simao M" <[EMAIL PROTECTED]> 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()
(interactive)
(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"
nil))
(define-key LaTeX-mode-map [(super meta f8)] (tex-build-command-function "View
PDF" nil))
Stefan.
_______________________________________________
auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex