How can I find out which TeX engine my AUCTeX uses? How can I change the TeX engine my AUCTeX uses (specifically, (a) to LuaTeX, (b) to XeTeX)? Following this post, I tried to inspect the value of the variable TeX-engine, however this variable isn't defined in my environment, even though AUCTeX works fine.
Asked
Active
Viewed 965 times
4
1 Answers
7
This variable is not defined (or set) until AUCTeX is loaded. On your system, it seems to be deferred until it is first needed ("autoloaded" in emacs slang).
More precisely:
- you start emacs, some initialization happens during which emacs notes that
LaTeX-modeis defined in some.elfile in the AUCTeX package; - if you try to inspect
TeX-engineat this point, the variable has never been defined; - if you now open a
.texfile, emacs turns onLaTeX-mode, which is not loaded yet. So emacs loads the AUCTeX package, and nowTeX-engineis defined; - at this point, you can inspect
TeX-enginefrom any buffer of the emacs session (it will have a default value in all buffers, and a buffer-local value in AUCTeX buffers).
For your second question, you can use the command TeX-engine-set, which will apply the setting to the current buffer. To apply the setting to the default value (for all buffers), set the variable through the customize interface.
T. Verron
- 4,283
- 2
- 24
- 56