[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pdflatex short-cut keys
From: |
Stefan Reichör |
Subject: |
Re: pdflatex short-cut keys |
Date: |
Mon, 19 Nov 2007 19:25:12 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
Christian_Yale <cseljatib@gmail.com> writes:
> hi there,
>
> I want to have a short-cut key for running latex (under pdf mode) in
> emacs22, then i do not need to click the icon (the lion one, where
> appear 'Run LaTeX' if you put the mouse over it) for doing so. I put
> the following in my .emacs file, but it did not work (i wanted to get
> "ALT+t" to run latex):
>
> (list "pdfLaTeX" "pdflatex '\\nonstopmode\\input{%t}'" 'TeX-run-LaTeX
> nil t)
>
> (global-set-key "\M-t" 'do-pdflatex)
> (defun do-pdflatex ()
> "pdflatex the current file."
> (interactive)
> (TeX-command "pdfLaTeX" 'TeX-master-file))
>
> but, is not working at all, I mean when i "ALT+t" appear a message (in
> emacs) that says
I use the following to generate specialized latex functions:
(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 [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.
--
Posted via a free Usenet account from http://www.teranews.com
Re: pdflatex short-cut keys,
Stefan Reichör <=