From mboxrd@z Thu Jan 1 00:00:00 1970 From: Emmanuel Charpentier Subject: Re: Possible bug in org-mode (MELPA version as of 1018-11-25) : #+language: is not (fully) honored. Date: Thu, 29 Nov 2018 18:31:00 +0100 Message-ID: References: <7ecc5c8e82316b99d6a55b77a29f1a8d1e77ca5b.camel@gmail.com> <87sgzmk3fn.fsf@gmail.com> <87pnuqtggf.fsf@nicolasgoaziou.fr> <070afa36c50daaec4016356bbb36d2167f358616.camel@gmail.com> <87pnuqrsw4.fsf@nicolasgoaziou.fr> <875zwhs3dr.fsf@nicolasgoaziou.fr> <87tvk0q8op.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000083d18a057bd10cfa" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSQLa-0003mo-Pp for emacs-orgmode@gnu.org; Thu, 29 Nov 2018 12:43:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSQ9h-0004km-RZ for emacs-orgmode@gnu.org; Thu, 29 Nov 2018 12:31:15 -0500 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]:33213) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSQ9h-0004kQ-D2 for emacs-orgmode@gnu.org; Thu, 29 Nov 2018 12:31:13 -0500 Received: by mail-ot1-x329.google.com with SMTP id i20so2539718otl.0 for ; Thu, 29 Nov 2018 09:31:13 -0800 (PST) In-Reply-To: <87tvk0q8op.fsf@nicolasgoaziou.fr> 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: emacs-orgmode@gnu.org --00000000000083d18a057bd10cfa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Nicolas, Thanks a lot for bearing with my nitpicking. A couple remarks below Le jeudi 29 novembre 2018 =C3=A0 15:07 +0100, Nicolas Goaziou a =C3=A9crit = : > Hello, > > emanuel.charpentier@gmail.com writes: > > > AFAICT, polyglossia is to be preferred to babel for use with > > xelatex or > > lualatex. I'll see if this can be accomodated. > > What I mean is that you can also add compiler dependant packages in > `org-latex-packages-alist'. This is *not* *documented* (not even in the `org-latex-packages-alist''s docstring). I *checked* that one can add 4-element "cells" to this list (i. e. (list argument package, snippet-flag, list-of-compilers)), but could not *guess* it : I'm still running /H sapiens sapiens L./ v 1.0, no telepathic interface, no oracular coprocessor. The only way would have been to read the source code : not exactly the first reflex of the average end-user. > No need to change the default package list. I dispute that, since this "special configuration" is needed for LaTeX export *only* , and *only* with non-English #+language:s. This "exceptional" treatment should be handled silently by org-mode (as it does with ODT, HTML and plain text export...). But see below. > > > it should be ("AUTO" "babel" t). > > > > OK. That's much clearer. And does what is intended, BTW. > > > > Shouldn't that be default ?(No, I don't (yet) know *how* to do > > that..). > > Babel is no small package. Agreed. And polyglossia is worse... > I think it would be a bit invasive as > a default package. Also agreed, with the reservation that "invasive" didn't mean the same thing in the 1980s (when the core size of computers was measured in kilobytes) and in the 2010s (the current core measurement unit is the /giga/byte...). > However, it is a good candidate for user-defined > packages, i.e., `org-latex-packages-alist'. Again, I think that the end user should *not* have to worry with this only when exporting to LaTeX (or beamer or PDF). If this can be handled silently when exporting to ODT, HTML or plain text, it should be handled silently when exporting to LaTeX. I do not know how to handle this. My *hunch* is that the Latex Export function generating the preamble should check for language, and if not default, add the relevant package(s) to the preamble. I'll need to dive in the source code to be more precise (not anytime soon, though...). > > Thus introducing a serious problem : exporting to text or ODT works > > as > > described, whereas export to latex needs (undocumented) > > supplementary > > steps. > > > > At the very minimum, this need for further config should be > > mentioned > > in the docs ; preferably, a default should be proposed. > > See above about the default. However, please feel free to suggest > documentation improvements, however. I'll propose a documentation attempt. But this should be considered as a workaround, the real solution being the implementation of automatic handling... Cordially yours, -- Emmanuel Charpentier > Regards, > > > --00000000000083d18a057bd10cfa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear Nicolas,

Thanks a lot f= or bearing with my nitpicking. A couple remarks below

Le jeudi 29 novembre = 2018 =C3=A0 15:07 +0100, Nicolas Goaziou a =C3=A9crit=C2=A0:
>= ; Hello,
>
> =
> > AFAICT, polyglossia is to be= preferred to babel for use with
> > xelatex or
> > lualatex. I'll see if t= his can be accomodated.
= >
<= div class=3D"gmail-" style=3D"width:71ch">> What I mean is that you can also add compiler dependan= t packages in
> `org-latex-packages-alist'.<= /div>

This is *not* *documented* (not even in the `org-latex-package= s-alist''s docstring).

I *checked* that one can add 4-element "= ;cells" to this list (i. e. (list argument package, snippet-flag, list= -of-compilers)), but could not *guess* it : I'm still running /H sapien= s sapiens L./ v 1.0, no telepathic interface, no oracular coprocessor. The = only way would have been to read the source code : not exactly the first re= flex of the average end-user.

=
> No need to change the default package list.
=

I dispute that, since this "special configuration" is nee= ded for LaTeX export *only* , and *only* with non-English #+language:s. Thi= s "exceptional" treatment should be handled silently by org-mode = (as it does with ODT, HTML and plain text export...). But see below.
<= div class=3D"gmail-" style=3D"color:rgb(46,52,54);font-family:monospace;fon= t-size:14.6667px;width:71ch">
> > > = it should be ("AUTO" "babel" t).
> > =
> > OK. That's much clearer. And does what is intended= , BTW.
> >= ;
> > Shouldn't that be default ?(No, I don'= ;t (yet) know *how* to do
> > that..).
>
<= /div>
> Babel is no small package.

Agreed. = And polyglossia is worse...

> I think it would be a bit invasive as
> <= /span>a default package.

Also agreed, with the reservat= ion that "invasive" didn't mean the same thing in the 1980s (= when the core size of computers was measured in kilobytes) and in the 2010s= (the current core measurement unit is the /giga/byte...).

> However, it is a goo= d candidate for user-defined
> packages, i.e., `or= g-latex-packages-alist'.

Again, I think that the end user= should *not* have to worry with this only when exporting to LaTeX (or beam= er or PDF). If this can be handled silently when exporting to ODT, HTML or = plain text, it should be handled silently when exporting to LaTeX.

I do not= know how to handle this. My *hunch* is that the Latex Export function gene= rating the preamble should check for language, and if not default, add the = relevant package(s) to the preamble. I'll need to dive in the source co= de to be more precise (not anytime soon, though...).

> > Thus introducing a = serious problem : exporting to text or ODT works
> > as
> > described, whereas = export to latex needs (undocumented)
> > supplementary
> > steps.
> = >
=
> > At the very minimum, this need for further config should be
> > mentioned<= /div>
> > in the docs ; preferably, a default should be proposed.
>
> See above abo= ut the default. However, please feel free to suggest
> documentation improvements, however.

I'll propose a d= ocumentation attempt. But this should be considered as a workaround, the re= al solution being the implementation of automatic handling...

Cordially you= rs,

--
Emmanuel Charpentier


> Regards,
>




--00000000000083d18a057bd10cfa--