I am using emacs 29.2 (installed via brew) and auctex (14.04) on a Mac (12.7.4). My .emacs file shows: '(enable-local-variables :t)
I have the following at the end of a TeX file:
%%% Local Variables:
%%% coding: utf-8
%%% mode: latex
%%% TeX-engine: luatex
%%% TeX-command-extra-options: "-shell-escape"
%%% TeX-master: t
%%% End:
but nothing changes -- the file is compiled with the default engine, XeLaTeX. Also tried the first-line form:
%% -*- coding: utf-8;mode: latex;TeX-engine: luatex;TeX-command-extra-options: "-shell-escape";TeX-master: t; -*-
to no effect.
I initiate a TeX run with C-c C-a
. This worked with non-brew emacs in the past, but I've clearly missed something.
M-x normal-mode
.'(enable-local-variables :t)
in your init file, i.e., a colon beforet
as:t
or is it a typo?xelatex
which is not the default compiler. Can you please try to start Emacs asemacs -Q
, then in*scratch*
buffer, eval the following(progn (setq debug-on-error t) (package-initialize t) (package-activate 'auctex))
(i.e., set the cursor after the last)
and hitC-x C-e
) and then open your .tex file and try it again? Also doM-x list-load-path-shadows RET
to check you don't have any other AUCTeX installation/files sitting on your HD.emacs -Q
upthread and see if your .tex file works as expected.