Discussion:
[AUCTeX] shortcut to compile latex only
Jonas Frey
2017-09-11 18:37:58 UTC
Permalink
Hi,

I want to set up a shortcut to only compile latex in auctex, circumventing
the automation and guessing of the usual TeX-compile-master command. How
can I do that?

How can I get a shortcut corresponding to
C-c C-c RET LaTeX RET
bound eg to a function key?

Thanks!

Best,

Jonas
g***@gmail.com
2017-09-11 20:16:13 UTC
Permalink
Hi Jonas,

try with

(define-key TeX-mode-map [f8] [?\C-c ?\C-c ?l ?a ?t ?e ?x return])

you can add it to the LaTeX-mode-hook. But probably there's a more elegant solution.

Cheers,
J
Hi,
I want to set up a shortcut to only compile latex in auctex, circumventing the automation and guessing of the usual TeX-compile-master command. How can I do that?
How can I get a shortcut corresponding to
C-c C-c RET LaTeX RET
bound eg to a function key?
Thanks!
Best,
Jonas
Jonas Frey
2017-09-11 21:22:05 UTC
Permalink
Post by g***@gmail.com
try with
​​
(define-key TeX-mode-map [f8] [?\C-c ?\C-c ?l ?a ?t ?e ?x return])
you can add it to the LaTeX-mode-hook.
​​
​great that seems to work
​!​
except that there should be some upper case letters:​

​
​
(define-key TeX-mode-map [f8] [?\C-c ?\C-c ?L ?a ?T ?e ?X return])​

Thanks a lot!

Jonas
​
Post by g***@gmail.com
But probably there's a more elegant solution.
Cheers,
J
Post by Jonas Frey
Hi,
I want to set up a shortcut to only compile latex in auctex,
circumventing the automation and guessing of the usual TeX-compile-master
command. How can I do that?
Post by Jonas Frey
How can I get a shortcut corresponding to
C-c C-c RET LaTeX RET
bound eg to a function key?
Thanks!
Best,
Jonas
g***@gmail.com
2017-09-11 21:58:46 UTC
Permalink
Hi Jonas,

Glad to hear it works. It also works with lowercase letters; in fact, I think it should work with just [?\C-c ?\C-c ?l ?a return])​ or even just the "l". AUCTeX is smart ;)

Cheers,
J
​great that seems to work
​!​
except that there should be some upper case letters:​
Jonas Frey
2017-09-15 17:45:02 UTC
Permalink
Post by g***@gmail.com
Glad to hear it works. It also works with lowercase letters; in fact, I
think it should work with just [?\C-c ?\C-c ?l ?a return])​ or even just
the "l". AUCTeX is smart ;)
​I see, thanks!
​
Post by g***@gmail.com
Cheers,
J
Post by Jonas Frey
​great that seems to work
​!​
except that there should be some upper case letters:​
Piet van Oostrum
2017-09-13 12:15:20 UTC
Permalink
Post by g***@gmail.com
Hi Jonas,
try with
(define-key TeX-mode-map [f8] [?\C-c ?\C-c ?l ?a ?t ?e ?x return])
you can add it to the LaTeX-mode-hook. But probably there's a more elegant solution.
I think the more elegant solution would be to use elisp:

(define-key TeX-mode-map [f8]
(lambda () (interactive) (TeX-command "LaTeX" 'TeX-master-file)))
--
Piet van Oostrum <piet-***@vanoostrum.org>
WWW: http://piet.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
Loading...