[Top][All Lists]

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

Re: About LaTeX/TeX modes

From: Arash Esbati
Subject: Re: About LaTeX/TeX modes
Date: Sun, 07 Aug 2022 13:11:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Angelo Graziosi <angelo.g0@libero.it> writes:

> I notice that when in .tex documents one puts the statement 
> \PassOptionsToPackage{...}{...}
> before the 
> \documentclass{...}
> Emacs renders the buffers in TeX mode instead of LaTeX mode. This
> results a bit annoying because documents that do not need the
> '\PassOptionsToPackage' statement are classified as LaTeX-mode the
> other as TeX-mode and in tabbar one has each time to switch between
> these two groups.
> I am wondering if the fact I use  AUCTeX from Elpa is the cause of this..

AUCTeX expects the \documentclass macro early in the file.  I suggest
you add the following at the end of your .tex file:

%%% Local Variables:
%%% mode: latex
%%% End:

and reload your file.  AUCTeX should start in LaTeX mode regardless of
the macros it finds at the beginning of the file.

Best, Arash

reply via email to

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