auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

\documentclass does not activate latex-mode


From: jfbu
Subject: \documentclass does not activate latex-mode
Date: Sun, 14 Aug 2022 18:14:12 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0) Gecko/20100101 Thunderbird/91.12.0

Hi,

when I open a buffer on this file

----
\def\foo{bar}
\documentclass{foobar}
\begin{document}
hello
\end{document}
----

there is no activation of latex-mode.

I have to manually type-in M-x latex-mode.

What makes matters worse is that, in real life, I also
have issued (setq TeX-auto-save nil) earlier because
I edit LaTeX code in a directory which which should
not have any auto/ sub-directory, else something else
is broken (unrelated to latex or emacs).

The above file in real life is produced by some
build, so I must re-issue M-x latex-mode each time
I do M-x revert on the file after a new build.

Any hint to make my life less miserable?

I can not add any file local variable, the file is output
by some build.

Notice that the directory where the above file resides
does contain a foobar.cls file, if that helps.

But IMHO, should'nt \documentclass by itself trigger latex-mode?
It is relatively frequent to have to put code before the
\documentclass.

In my real life, the thing looks more like this

%% Hello there
\def\foobardocclass{report}
\documentclass[letterpaper,10pt,english]{foobar}


Best,

Jean-Fran├žois





reply via email to

[Prev in Thread] Current Thread [Next in Thread]