From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arash Esbati Newsgroups: gmane.emacs.devel Subject: Re: About LaTeX/TeX modes Date: Sun, 07 Aug 2022 13:11:11 +0200 Message-ID: <868ro0b968.fsf@gnu.org> References: <2025344680.2113516.1659863015529@mail1.libero.it> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14294"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 Cc: "emacs-devel@gnu.org" To: Angelo Graziosi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 07 13:12:36 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKeCy-0003aL-Et for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Aug 2022 13:12:36 +0200 Original-Received: from localhost ([::1]:38022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oKeCw-0007ti-Sr for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Aug 2022 07:12:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKeBt-0007BS-6B for emacs-devel@gnu.org; Sun, 07 Aug 2022 07:11:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52894) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKeBs-0001KL-69; Sun, 07 Aug 2022 07:11:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=cio26xj2hG6+Qap5QYGuMAJ5aPSK2tjbk9+Vo7a7cV4=; b=VOzFqRLS9b+XA98JHcma 6+YSbSSJMZqBx+sPe0bCdY1qt9A3H4zY5LcYOt/+XTGoM4MlPTloqQLD6Fs2eG8KLaeXpHm7TVpde TExqbKSU6lCIkWyahQsIDN/CibU3wXEDz3PDFqGNcTU1zZTaPifAVROJ9mmIxz0MSOYGxHC5hNXpX XVsPM4NU2JLcrmnlE5rM9hhCYIIuB+hKNfwcGTDinNURSovOn6F7hvAZ68q/psMiZvHFJLu59nDbq 7lfXyP5/r+yBoIpB3O6vkFERwjl1+3v2w5Eq4jLczQsfIjCFyK+aRe5ztyqeje1smsgg+a8Awn19v 9GyRb5kI9CxKQQ==; Original-Received: from pd9fb77f7.dip0.t-ipconnect.de ([217.251.119.247]:53955 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oKeBr-0006W0-K7; Sun, 07 Aug 2022 07:11:27 -0400 In-Reply-To: <2025344680.2113516.1659863015529@mail1.libero.it> (Angelo Graziosi's message of "Sun, 7 Aug 2022 11:03:35 +0200 (CEST)") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:293190 Archived-At: Angelo Graziosi 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