* pdflatex short-cut keys
@ 2007-11-19 1:29 Christian_Yale
2007-11-19 1:46 ` Joost Kremers
2007-11-19 18:25 ` Stefan Reichör
0 siblings, 2 replies; 9+ messages in thread
From: Christian_Yale @ 2007-11-19 1:29 UTC (permalink / raw)
To: help-gnu-emacs
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
Wrong type argument: stringp, nil
Any suggestions?
Thanks in advance
!!
Ps: about my PC-emacs stuff
I use emacs22 (under ubuntu-linux 7.10), with auctex and ess, to be
able to compile LaTeX and R files from only one program.
Within emacs22 i have installed ECB (http://ecb.sourceforge.net/) and
Org-Mode (http://orgmode.org/), and I also use subversion (http://
subversion.tigris.org/) as the basis of
project and R code version control.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pdflatex short-cut keys
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 18:25 ` Stefan Reichör
1 sibling, 1 reply; 9+ messages in thread
From: Joost Kremers @ 2007-11-19 1:46 UTC (permalink / raw)
To: help-gnu-emacs
Christian_Yale wrote:
> I want to have a short-cut key for running latex (under pdf mode) in
> emacs22,
C-c C-c RET
if the file was modified from the last time latex was run, that will do the
trick. C-c C-c is also the proper way to run other commands, such as
opening viewers and a couple of other things.
> 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):
the default binding of M-t is way too useful to rebind it to anything
else. IHMO you'd better stick to the shortcut keys that AUCTeX provides by
default, there's good reason why they're set up the way they are.
> (list "pdfLaTeX" "pdflatex '\\nonstopmode\\input{%t}'" 'TeX-run-LaTeX
> nil t)
i'm not entirely sure what you're trying to accomplish here.
> (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
>
> Wrong type argument: stringp, nil
somewhere a function is getting an argument of nil where a stringp is
expected. you'll probably have to dig a little to find out where.
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pdflatex short-cut keys
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>
0 siblings, 2 replies; 9+ messages in thread
From: Torben Knudsen @ 2007-11-19 7:49 UTC (permalink / raw)
To: help-gnu-emacs
>>>>> "Joost" == Joost Kremers <joostkremers@yahoo.com> writes:
Joost> Christian_Yale wrote:
>> I want to have a short-cut key for running latex (under pdf mode)
>> in emacs22,
Joost> C-c C-c RET
Joost> if the file was modified from the last time latex was run, that
Joost> will do the trick. C-c C-c is also the proper way to run other
Joost> commands, such as opening viewers and a couple of other things.
When I do C-c C-c RET "pdflatex" is not on the list!
Q1 What is the right command similar to external command pdflatex?
Q2 How do I get it on the list for C-c C-c RET?
--
Associate Prof. Ph.D Torben Knudsen Phone : (+45) 9635 8670
Section of Automation and Control, Mobile : (+45) 2787 9826
Department of Electronic Systems, Email : tk@es.aau.dk
Aalborg University
Fredrik Bajersvej 7
DK-9220 Aalborg Ø
Denmark
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pdflatex short-cut keys
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>
1 sibling, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2007-11-19 13:17 UTC (permalink / raw)
To: Torben Knudsen; +Cc: help-gnu-emacs
Am 19.11.2007 um 08:49 schrieb Torben Knudsen:
> When I do C-c C-c RET "pdflatex" is not on the list!
> Q1 What is the right command similar to external command pdflatex?
> Q2 How do I get it on the list for C-c C-c RET?
In menu Command -> TeXing Options you have choices. You always use
the LaTeX command, and depending on the output mode chosen and
reflected in mode-line either PDF or DVI is created. (BTW, modern TeX
distribution all use pdfTeX.)
In LaTeX menu you have the item 'Read the AUCTeX Manual', C-c TAB. So
you'll never see pdfLaTeX in the Command menu – except you customise it.
--
Greetings
Pete
"I love deadlines. I love the whooshing noise they make as they go by."
(Douglas Adams)
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.3789.1195478319.18990.help-gnu-emacs@gnu.org>]
* Re: pdflatex short-cut keys
[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
0 siblings, 1 reply; 9+ messages in thread
From: Torben Knudsen @ 2007-11-21 14:22 UTC (permalink / raw)
To: help-gnu-emacs
>>>>> "Peter" == Peter Dyballa <Peter_Dyballa@Web.DE> writes:
Peter> Am 19.11.2007 um 08:49 schrieb Torben Knudsen:
>> When I do C-c C-c RET "pdflatex" is not on the list! Q1 What is
>> the right command similar to external command pdflatex? Q2 How do
>> I get it on the list for C-c C-c RET?
Peter> In menu Command -> TeXing Options you have choices. You always
Peter> use the LaTeX command, and depending on the output mode chosen
Peter> and reflected in mode-line either PDF or DVI is created. (BTW,
Peter> modern TeX distribution all use pdfTeX.)
I was not aware of different output modes. I only knew of one. Now I
have learned something.
Thanks
--
Associate Prof. Ph.D Torben Knudsen Phone : (+45) 9635 8670
Section of Automation and Control, Mobile : (+45) 2787 9826
Department of Electronic Systems, Email : tk@es.aau.dk
Aalborg University
Fredrik Bajersvej 7
DK-9220 Aalborg Ø
Denmark
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pdflatex short-cut keys
2007-11-21 14:22 ` Torben Knudsen
@ 2007-11-21 17:23 ` Amy Templeton
0 siblings, 0 replies; 9+ messages in thread
From: Amy Templeton @ 2007-11-21 17:23 UTC (permalink / raw)
To: help-gnu-emacs
Torben Knudsen <tk@es.aau.dk> wrote:
> When I do C-c C-c RET "pdflatex" is not on the list! Q1 What is
> the right command similar to external command pdflatex? Q2 How do
> I get it on the list for C-c C-c RET?
Another option is to add "pdftex" (without the quotes) to the options
you pass to \documentclass. That's always worked just fine for me.
Amy
--
The typewriting machine, when played with expression, is no more
annoying than the piano when played by a sister or near relation.
-- Oscar Wilde
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pdflatex short-cut keys
2007-11-19 1:29 pdflatex short-cut keys Christian_Yale
2007-11-19 1:46 ` Joost Kremers
@ 2007-11-19 18:25 ` Stefan Reichör
2007-11-20 14:09 ` David Rod
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Reichör @ 2007-11-19 18:25 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pdflatex short-cut keys
2007-11-19 18:25 ` Stefan Reichör
@ 2007-11-20 14:09 ` David Rod
2007-11-20 18:50 ` Stefan Reichör
0 siblings, 1 reply; 9+ messages in thread
From: David Rod @ 2007-11-20 14:09 UTC (permalink / raw)
To: help-gnu-emacs
what is meant by the key as super
does your code interfere with any of the functions or keybindings in latex-mode?
--
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pdflatex short-cut keys
2007-11-20 14:09 ` David Rod
@ 2007-11-20 18:50 ` Stefan Reichör
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Reichör @ 2007-11-20 18:50 UTC (permalink / raw)
To: help-gnu-emacs
David Rod <angel_ov_north@tiscali.co.uk> writes:
> what is meant by the key as super
I use the windows-keys to gain some extra keybindings:
(setq w32-pass-lwindow-to-system nil
w32-pass-rwindow-to-system nil)
(setq w32-lwindow-modifier 'super) ; lwindow acts as super
(setq w32-rwindow-modifier 'hyper) ; rwindow acts as hyper
> does your code interfere with any of the functions or keybindings in latex-mode?
No, I define some extra keybindings.
To get back to your question. If you want to run PdfLatex via M-t, you could use the following:
(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 [(meta ?t)] (tex-build-command-function "PdfLaTeX" t t))
A precondition is, that PdfLaTeX is available via C-c C-c
Stefan.
--
Posted via a free Usenet account from http://www.teranews.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-11-21 17:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-11-20 14:09 ` David Rod
2007-11-20 18:50 ` Stefan Reichör
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.