From: Arash Esbati <arash@gnu.org>
To: Angelo Graziosi <angelo.g0@libero.it>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: About LaTeX/TeX modes
Date: Sun, 07 Aug 2022 13:11:11 +0200 [thread overview]
Message-ID: <868ro0b968.fsf@gnu.org> (raw)
In-Reply-To: <2025344680.2113516.1659863015529@mail1.libero.it> (Angelo Graziosi's message of "Sun, 7 Aug 2022 11:03:35 +0200 (CEST)")
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
next prev parent reply other threads:[~2022-08-07 11:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-07 9:03 About LaTeX/TeX modes Angelo Graziosi
2022-08-07 11:11 ` Arash Esbati [this message]
2022-08-07 12:32 ` Angelo Graziosi
2022-08-07 13:31 ` T.V Raman
2022-08-07 19:25 ` Arash Esbati
2022-08-08 13:56 ` T.V Raman
2022-08-08 14:29 ` Arash Esbati
2022-08-08 15:32 ` T.V Raman
2022-08-09 10:53 ` Per Starbäck
2022-08-09 11:47 ` Stefan Kangas
2022-08-09 14:01 ` T.V Raman
2022-08-09 20:41 ` Matthias Meulien
2022-08-10 17:07 ` Tassilo Horn
2022-08-09 14:50 ` Angelo Graziosi
2022-08-10 23:47 ` Angelo Graziosi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=868ro0b968.fsf@gnu.org \
--to=arash@gnu.org \
--cc=angelo.g0@libero.it \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).