From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Possible bug in org-mode (MELPA version as of 1018-11-25) : #+language: is not (fully) honored. Date: Wed, 28 Nov 2018 15:06:24 +0100 Message-ID: <875zwhs3dr.fsf@nicolasgoaziou.fr> References: <7ecc5c8e82316b99d6a55b77a29f1a8d1e77ca5b.camel@gmail.com> <87sgzmk3fn.fsf@gmail.com> <87pnuqtggf.fsf@nicolasgoaziou.fr> <070afa36c50daaec4016356bbb36d2167f358616.camel@gmail.com> <87pnuqrsw4.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gS0TR-0004pT-UP for emacs-orgmode@gnu.org; Wed, 28 Nov 2018 09:05:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gS0TM-0006Hd-3C for emacs-orgmode@gnu.org; Wed, 28 Nov 2018 09:05:53 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:54597) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gS0TL-0006GZ-Lv for emacs-orgmode@gnu.org; Wed, 28 Nov 2018 09:05:48 -0500 In-Reply-To: (Emmanuel Charpentier's message of "Wed, 28 Nov 2018 12:38:52 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Emmanuel Charpentier Cc: emacs-orgmode@gnu.org Hello, Emmanuel Charpentier writes: > Close, but no cigar : > > I used the `customize' interface to add it to `org-latex-default- > packages-alist' (because the package to load is compiler-dependent), This has nothing to do with compiler. You can add it to `org-latex-packages-alist'. > which becomes: > > (("AUTO" "inputenc" t > ("pdflatex")) > ("T1" "fontenc" t > ("pdflatex")) > (#1="" "graphicx" t nil) > (#1# "grffile" t nil) > (#1# "longtable" nil nil) > (#1# "wrapfig" nil nil) > (#1# "rotating" nil nil) > ("normalem" "ulem" t nil) > (#1# "amsmath" t nil) > (#1# "textcomp" t nil) > (#1# "amssymb" t nil) > (#1# "capt-of" nil nil) > (#1# "hyperref" nil nil) > (#1# "babel" t > ("pdflatex")) > (#1# "polyglossia" t > ("xelatex" "lualatex"))) > > I then retried an example (similar to the first one, but another > machine...) (see enclosed files). > > * The latex file does indeed contain "\usepackage{babel}" at the end > of preamble > > * But the language is never set. > > * Therefore, no "frenchizing" happens... > > This is due to the fact that, in order to get what I mean, the babel > loading should be "\usepackage[frenchb]{babel}", i. e. take the value > corresponding to whatever #+language: implies ("frenchb" for "fr", > etc...). I do not know how to do that. See `org-latex-classes' docstring: it should be ("AUTO" "babel" t). > * If this setup is necessary to get #+langiage: honored fot LaTeX > export, this should be done by default (i. e. in org's source > code). AFAIR, there is no clean way to handle that, so we let users decide what they want. > * One might wish to allow to fully use babel's (and polyglossia's) > abilities by specifying a set of possible #+language:s (first > call) or switch to another language (further calls down the > file...). See `org-latex-classes' docstring. > * concerning french: I understand that "frenchb" is obsolete and > that one should use "french" instead (better compatibility with > ispell and flyspell-babel, among others)... I didn't know that. I'll fix it in master. > * I suggest a '(#1# "fontspec" t '(xelatex lualatex)), and possibly > an '(#1# "mathspec" t '(xetex luatex)) or '(#1# "unicode-math" t > '(xetex luatex)) > entry(ies) to be added to the default : xetex is more and more > used, and luatex is officially the successor to pdftex... I use neither xetex or luatex so I cannot comment of this. However note that default packages should be very limited. It is easy enough to add more of them to standard packages. Regards, -- Nicolas Goaziou