all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stefan Reichör" <stefan@xsteve.at>
To: help-gnu-emacs@gnu.org
Subject: Re: pdflatex short-cut keys
Date: Mon, 19 Nov 2007 19:25:12 +0100	[thread overview]
Message-ID: <87hcjixfcn.fsf@xsteve.at> (raw)
In-Reply-To: f177c8cf-b3e7-4127-b6ec-27d337631ea6@41g2000hsh.googlegroups.com

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

  parent reply	other threads:[~2007-11-19 18:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-19  1:29 pdflatex short-cut keys Christian_Yale
2007-11-19  1:46 ` Joost Kremers
2007-11-19  7:49   ` Torben Knudsen
2007-11-19 13:17     ` Peter Dyballa
     [not found]     ` <mailman.3789.1195478319.18990.help-gnu-emacs@gnu.org>
2007-11-21 14:22       ` Torben Knudsen
2007-11-21 17:23         ` Amy Templeton
2007-11-19 18:25 ` Stefan Reichör [this message]
2007-11-20 14:09   ` David Rod
2007-11-20 18:50     ` Stefan Reichör

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hcjixfcn.fsf@xsteve.at \
    --to=stefan@xsteve.at \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.