all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* New try at multi-lingual export to latex/pdf using pdflatex and babel
@ 2024-01-21  8:44 Pedro Andres Aranda Gutierrez
  2024-01-21 13:02 ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-01-21  8:44 UTC (permalink / raw)
  To: Org Mode List


[-- Attachment #1.1: Type: text/plain, Size: 402 bytes --]

Hi,

hopefully this is more informative. It complements the =polyglossia=
example with some =babel= that can be compiled with pdflatex.

Cheers, /PA

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #1.2: Type: text/html, Size: 753 bytes --]

[-- Attachment #2: 0001-Add-multi-language-babel-example.patch --]
[-- Type: text/x-patch, Size: 1734 bytes --]

From 4d0dcde4f8f149d3d028164c3cd3c8e9bff2a060 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paaguti@gmail.com>
Date: Sun, 21 Jan 2024 09:39:35 +0100
Subject: [PATCH] Add multi-language babel example

---
 doc/org-manual.org | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index acc6d07ff..506b9b844 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13925,6 +13925,10 @@ general options (see [[*Export Settings]]).
                '("AUTO" "polyglossia" t ("xelatex" "lualatex")))
   #+end_src
 
+  The value used for =babel= or =polyglossia= is set in
+  ~org-export-default-language~. The default value is ~"en"~, which
+  means American English.
+
 - =LATEX_CLASS= ::
 
   #+cindex: @samp{LATEX_CLASS}, keyword
@@ -14079,6 +14083,22 @@ the =\babelprovide= command:
 ,#+LATEX_HEADER: \babelprovide[import, main]{AUTO}
 #+end_example
 
+Another example using ~pdflatex~ and ~babel~ and mixing Latin and
+Greek fonts in the document using the =\PassOptionsToPackage= command
+from =babel= would be:
+
+#+begin_example
+,#+latex_class_options: [greek,spanish,oneside]
+,#+language: es
+,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
+,#+latex_header: \usepackage{alphabeta} % to support greek script
+#+end_example
+
+Note that you can add more options to the ~latex_class_options~.
+The important thing is that you include the *translated* name
+for the =#+language:# you specify in the other commands for
+your LaTeX header.
+
 =Polyglossia=, for this procedure to be effective, must be loaded
 using the same =babel= classic syntax (but note that /this is not/
 the actual polyglossia syntax).  For example, suppose a document
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-21  8:44 New try at multi-lingual export to latex/pdf using pdflatex and babel Pedro Andres Aranda Gutierrez
@ 2024-01-21 13:02 ` Ihor Radchenko
  2024-01-21 17:11   ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-01-21 13:02 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> hopefully this is more informative. It complements the =polyglossia=
> example with some =babel= that can be compiled with pdflatex.

Thanks!
Several minor comments.

> From 4d0dcde4f8f149d3d028164c3cd3c8e9bff2a060 Mon Sep 17 00:00:00 2001
> From: "Pedro A. Aranda" <paaguti@gmail.com>
> Date: Sun, 21 Jan 2024 09:39:35 +0100
> Subject: [PATCH] Add multi-language babel example

Please indicate that the patch deals with the manual in the first line:

  org-manual: Add multi-language babel example

And add the changelog entry.

> +Another example using ~pdflatex~ and ~babel~ and mixing Latin and

=pdflatex= and =babel= I think - we use ~...~ mostly for Elisp code.

> +Greek fonts in the document using the =\PassOptionsToPackage= command
> +from =babel= would be:
> +
> +#+begin_example
> +,#+latex_class_options: [greek,spanish,oneside]
> +,#+language: es
> +,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
> +,#+latex_header: \usepackage{alphabeta} % to support greek script
> +#+end_example
> +
> +Note that you can add more options to the ~latex_class_options~.

=#+latex_class_options:=

> +The important thing is that you include the *translated* name

Maybe just /translated/? Bold is usually considered too strong
typographically.

Also, I do not really understand what you mean by "translated" here.

> +for the =#+language:# you specify in the other commands for

=#+language:=

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-21 13:02 ` Ihor Radchenko
@ 2024-01-21 17:11   ` Pedro Andres Aranda Gutierrez
  2024-01-21 17:47     ` Juan Manuel Macías
  2024-02-09 23:10     ` Ihor Radchenko
  0 siblings, 2 replies; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-01-21 17:11 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Org Mode List


[-- Attachment #1.1: Type: text/plain, Size: 2175 bytes --]

Thanks for the feedback, attached is a new version

Best, /PA

On Sun, 21 Jan 2024 at 13:59, Ihor Radchenko <yantar92@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> > hopefully this is more informative. It complements the =polyglossia=
> > example with some =babel= that can be compiled with pdflatex.
>
> Thanks!
> Several minor comments.
>
> > From 4d0dcde4f8f149d3d028164c3cd3c8e9bff2a060 Mon Sep 17 00:00:00 2001
> > From: "Pedro A. Aranda" <paaguti@gmail.com>
> > Date: Sun, 21 Jan 2024 09:39:35 +0100
> > Subject: [PATCH] Add multi-language babel example
>
> Please indicate that the patch deals with the manual in the first line:
>
>   org-manual: Add multi-language babel example
>
> And add the changelog entry.
>
> > +Another example using ~pdflatex~ and ~babel~ and mixing Latin and
>
> =pdflatex= and =babel= I think - we use ~...~ mostly for Elisp code.
>
> > +Greek fonts in the document using the =\PassOptionsToPackage= command
> > +from =babel= would be:
> > +
> > +#+begin_example
> > +,#+latex_class_options: [greek,spanish,oneside]
> > +,#+language: es
> > +,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
> > +,#+latex_header: \usepackage{alphabeta} % to support greek script
> > +#+end_example
> > +
> > +Note that you can add more options to the ~latex_class_options~.
>
> =#+latex_class_options:=
>
> > +The important thing is that you include the *translated* name
>
> Maybe just /translated/? Bold is usually considered too strong
> typographically.
>
> Also, I do not really understand what you mean by "translated" here.
>
> > +for the =#+language:# you specify in the other commands for
>
> =#+language:=
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #1.2: Type: text/html, Size: 3347 bytes --]

[-- Attachment #2: 0001-org-manual-Add-multi-language-babel-example.patch --]
[-- Type: text/x-patch, Size: 2254 bytes --]

From d540ad65d228bfb31a672cc1f7a771504cb3f58c Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paaguti@gmail.com>
Date: Sun, 21 Jan 2024 18:06:19 +0100
Subject: [PATCH] org-manual: Add multi-language babel example

org-manual.org: Add multi-language babel example

* doc/org-manual.org: Add an example for the LaTeX header commands
needed to export multi-language documents to pdflatex. In this case
we need to use and configure the babel package appropriately.

---
 doc/org-manual.org | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index acc6d07ff..71cc8b1a1 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13925,6 +13925,10 @@ general options (see [[*Export Settings]]).
                '("AUTO" "polyglossia" t ("xelatex" "lualatex")))
   #+end_src
 
+  The value used for =babel= or =polyglossia= is set in
+  ~org-export-default-language~. The default value is ~"en"~, which
+  means American English.
+
 - =LATEX_CLASS= ::
 
   #+cindex: @samp{LATEX_CLASS}, keyword
@@ -14079,6 +14083,37 @@ the =\babelprovide= command:
 ,#+LATEX_HEADER: \babelprovide[import, main]{AUTO}
 #+end_example
 
+Another example using =pdflatex= and =babel= and mixing Latin and
+Greek fonts in the document using the =\PassOptionsToPackage= command
+from =babel= would be:
+
+#+begin_example
+,#+latex_class_options: [greek,spanish,oneside]
+,#+language: es
+,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
+,#+latex_header: \usepackage{alphabeta} % to support greek script
+#+end_example
+
+Note that you can add more options to the ~latex_class_options~.
+You need to include the language resulting from translating the
+=#+language:= statement in the other commands in your LaTeX header.
+In the previous example
+
+#+begin_example
+,#+language: es
+#+end_example
+
+is translated to
+
+#+begin_example
+\usepackage[spanish]{babel}
+#+end_example
+
+and =spanish= is used for the other header commands and in the
+=#+latex_class_options=.
+
+
+
 =Polyglossia=, for this procedure to be effective, must be loaded
 using the same =babel= classic syntax (but note that /this is not/
 the actual polyglossia syntax).  For example, suppose a document
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-21 17:11   ` Pedro Andres Aranda Gutierrez
@ 2024-01-21 17:47     ` Juan Manuel Macías
  2024-01-22  6:30       ` Pedro Andres Aranda Gutierrez
  2024-01-22 12:10       ` Ihor Radchenko
  2024-02-09 23:10     ` Ihor Radchenko
  1 sibling, 2 replies; 29+ messages in thread
From: Juan Manuel Macías @ 2024-01-21 17:47 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Ihor Radchenko, Org Mode List

Pedro Andres Aranda Gutierrez writes:

> +#+begin_example
> +,#+latex_class_options: [greek,spanish,oneside]
> +,#+language: es
> +,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
> +,#+latex_header: \usepackage{alphabeta} % to support greek script
> +#+end_example

I think this example doesn't take advantage of the AUTO facility, which
is what the section is about. Btw, maybe it would be nice to extend ''AUTO'' to
latex_class_options and \PassOptionsToPackage? Something like:

#+latex_class_options: [greek,AUTO,oneside]
#+language: es
...

However, I would only find the \PassOptionsToPackage command useful in
classes that already load babel with a main language. From Org, using
just pdfTeX, I think it would be simpler:

#+language: es
#+latex_header: \usepackage[greek,AUTO]{babel}
#+latex_header: \usepackage{alphabeta} % to support greek script

or this variant, using babelprovide and an INI file:

#+language: es
#+latex_header: \usepackage[greek]{babel}
#+latex_header: \babelprovide[import,main]{AUTO}
#+latex_header: \usepackage{alphabeta}

Best regards,

Juan Manuel 




^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-21 17:47     ` Juan Manuel Macías
@ 2024-01-22  6:30       ` Pedro Andres Aranda Gutierrez
  2024-01-22  6:47         ` Pedro Andres Aranda Gutierrez
  2024-01-22 12:10       ` Ihor Radchenko
  1 sibling, 1 reply; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-01-22  6:30 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: Ihor Radchenko, Org Mode List

[-- Attachment #1: Type: text/plain, Size: 2776 bytes --]

HI Juan Manuel,

you are absolutely right. There are many things that should improve in the
LaTeX exporter and simplifying language treatment is one of them. What I
show in my example is how to circumvent all the limitations in the exporter
and give a working example for people who need it.

 Adding AUTO to latex_class_options would be extremely helpful, since then
you can load babel indicating the main language only and even avoid the
PassOptions and can live with \usepackage{alphabeta} only.
This is a MWE for mixing German and Greek which I use to compare with what
org-mode generates:

---cut---
\documentclass[greek,ngerman]{scrartcl}
%% \documentclass[greek,ngerman]{scrreprt}
%% \documentclass[greek,ngerman]{scrbook}
%% \documentclass[greek,ngerman]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
%% \PassOptionsToPackage{main=ngerman}{babel}
\usepackage{alphabeta}

\begin{document}
Ach, unsere Freunde die Griechen: \textgreek{νους} (mit
\verb|\textgreek{}|).\par
Ach, unsere Freunde die Griechen: νους (direkt im Text).
\end{document}
---cut---
The commented document classes are all I had the time to test.

Best, /PA


On Sun, 21 Jan 2024 at 18:47, Juan Manuel Macías <maciaschain@posteo.net>
wrote:

> Pedro Andres Aranda Gutierrez writes:
>
> > +#+begin_example
> > +,#+latex_class_options: [greek,spanish,oneside]
> > +,#+language: es
> > +,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
> > +,#+latex_header: \usepackage{alphabeta} % to support greek script
> > +#+end_example
>
> I think this example doesn't take advantage of the AUTO facility, which
> is what the section is about. Btw, maybe it would be nice to extend
> ''AUTO'' to
> latex_class_options and \PassOptionsToPackage? Something like:
>
> #+latex_class_options: [greek,AUTO,oneside]
> #+language: es
> ...
>
> However, I would only find the \PassOptionsToPackage command useful in
> classes that already load babel with a main language. From Org, using
> just pdfTeX, I think it would be simpler:
>
> #+language: es
> #+latex_header: \usepackage[greek,AUTO]{babel}
> #+latex_header: \usepackage{alphabeta} % to support greek script
>
> or this variant, using babelprovide and an INI file:
>
> #+language: es
> #+latex_header: \usepackage[greek]{babel}
> #+latex_header: \babelprovide[import,main]{AUTO}
> #+latex_header: \usepackage{alphabeta}
>
> Best regards,
>
> Juan Manuel
>
>
>

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 3574 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-22  6:30       ` Pedro Andres Aranda Gutierrez
@ 2024-01-22  6:47         ` Pedro Andres Aranda Gutierrez
  2024-01-22 13:11           ` Juan Manuel Macías
  0 siblings, 1 reply; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-01-22  6:47 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: Ihor Radchenko, Org Mode List

[-- Attachment #1: Type: text/plain, Size: 3524 bytes --]

PS: This is a very limited example. It would be nice to have more control
on fontenc. AFAIK there is not alphabeta for cyrillic encodings and
typesetting 'War and Peace' with its passages in French embedded in the
Russian text is sort of a headache ;-)

/PA

On Mon, 22 Jan 2024 at 07:30, Pedro Andres Aranda Gutierrez <
paaguti@gmail.com> wrote:

> HI Juan Manuel,
>
> you are absolutely right. There are many things that should improve in the
> LaTeX exporter and simplifying language treatment is one of them. What I
> show in my example is how to circumvent all the limitations in the exporter
> and give a working example for people who need it.
>
>  Adding AUTO to latex_class_options would be extremely helpful, since then
> you can load babel indicating the main language only and even avoid the
> PassOptions and can live with \usepackage{alphabeta} only.
> This is a MWE for mixing German and Greek which I use to compare with what
> org-mode generates:
>
> ---cut---
> \documentclass[greek,ngerman]{scrartcl}
> %% \documentclass[greek,ngerman]{scrreprt}
> %% \documentclass[greek,ngerman]{scrbook}
> %% \documentclass[greek,ngerman]{article}
> \usepackage[utf8]{inputenc}
> \usepackage[T1]{fontenc}
> \usepackage[ngerman]{babel}
> %% \PassOptionsToPackage{main=ngerman}{babel}
> \usepackage{alphabeta}
>
> \begin{document}
> Ach, unsere Freunde die Griechen: \textgreek{νους} (mit
> \verb|\textgreek{}|).\par
> Ach, unsere Freunde die Griechen: νους (direkt im Text).
> \end{document}
> ---cut---
> The commented document classes are all I had the time to test.
>
> Best, /PA
>
>
> On Sun, 21 Jan 2024 at 18:47, Juan Manuel Macías <maciaschain@posteo.net>
> wrote:
>
>> Pedro Andres Aranda Gutierrez writes:
>>
>> > +#+begin_example
>> > +,#+latex_class_options: [greek,spanish,oneside]
>> > +,#+language: es
>> > +,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
>> > +,#+latex_header: \usepackage{alphabeta} % to support greek script
>> > +#+end_example
>>
>> I think this example doesn't take advantage of the AUTO facility, which
>> is what the section is about. Btw, maybe it would be nice to extend
>> ''AUTO'' to
>> latex_class_options and \PassOptionsToPackage? Something like:
>>
>> #+latex_class_options: [greek,AUTO,oneside]
>> #+language: es
>> ...
>>
>> However, I would only find the \PassOptionsToPackage command useful in
>> classes that already load babel with a main language. From Org, using
>> just pdfTeX, I think it would be simpler:
>>
>> #+language: es
>> #+latex_header: \usepackage[greek,AUTO]{babel}
>> #+latex_header: \usepackage{alphabeta} % to support greek script
>>
>> or this variant, using babelprovide and an INI file:
>>
>> #+language: es
>> #+latex_header: \usepackage[greek]{babel}
>> #+latex_header: \babelprovide[import,main]{AUTO}
>> #+latex_header: \usepackage{alphabeta}
>>
>> Best regards,
>>
>> Juan Manuel
>>
>>
>>
>
> --
> Fragen sind nicht da, um beantwortet zu werden,
> Fragen sind da um gestellt zu werden
> Georg Kreisler
>
> Headaches with a Juju log:
> unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
> a leader-deposed hook here, but we can't yet
>
>

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 4747 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-21 17:47     ` Juan Manuel Macías
  2024-01-22  6:30       ` Pedro Andres Aranda Gutierrez
@ 2024-01-22 12:10       ` Ihor Radchenko
  2024-01-22 13:40         ` Juan Manuel Macías
  1 sibling, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-01-22 12:10 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: Pedro Andres Aranda Gutierrez, Org Mode List

Juan Manuel Macías <maciaschain@posteo.net> writes:

> Pedro Andres Aranda Gutierrez writes:
>
>> +#+begin_example
>> +,#+latex_class_options: [greek,spanish,oneside]
>> +,#+language: es
>> +,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
>> +,#+latex_header: \usepackage{alphabeta} % to support greek script
>> +#+end_example
>
> I think this example doesn't take advantage of the AUTO facility, which
> is what the section is about.

Do you have any suggestions how to improve the patch?

> ... Btw, maybe it would be nice to extend ''AUTO'' to
> latex_class_options and \PassOptionsToPackage? Something like:

It would really be nice to have an ox-latex maintainer who is deeply
familiar with LaTeX :)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-22  6:47         ` Pedro Andres Aranda Gutierrez
@ 2024-01-22 13:11           ` Juan Manuel Macías
  0 siblings, 0 replies; 29+ messages in thread
From: Juan Manuel Macías @ 2024-01-22 13:11 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Ihor Radchenko, Org Mode List

Hi, Pedro Andrés,

Pedro Andres Aranda Gutierrez writes:

> PS: This is a very limited example. It would be nice to have more
> control on fontenc. AFAIK there is not alphabeta for cyrillic
> encodings and typesetting 'War and Peace' with its passages in French
> embedded in the Russian text is sort of a headache ;-)

For scripts other than Latin it is highly recommended to use the 'new'
Unicode versions of TeX, XeTeX or LuaTeX, especially the latter, since
it is the natural replacement for pdfTeX. The input is Unicode and you
can easily use true type or opentype fonts via the fontspec package.
Babel already has full support for these engines and it is not necessary
to use polyglossia. Even with Babel you can associate fonts with certain
scripts such as Greek, Cyrillic, Devanagari, etc. Look at this example I
made with several scripts and several fonts:
https://i.imgur.com/56P6U0R.png

I'm currently working on Org having multilingual font and script support
in LaTeX export with LuaTeX and babel. Although now I have put it on
hold due to lack of time :-). And Ihor is working on a much more
flexible language naming system. These are issues that were discussed,
among others, in this thread:

https://list.orgmode.org/878r9t7x7y.fsf@posteo.net/

Regarding your patch example, is there any special reason for you to
load the languages in the class options? It's perfectly valid, although,
as I said, it's not supported by org's AUTO facility (at the moment). I
understand that it is useful when the document is monolingual, but for
more than one language I find it unnecessary and, in addition to loading the
options with \PassOptionsToPackage.

Best regards,

Juan Manuel 



 


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-22 12:10       ` Ihor Radchenko
@ 2024-01-22 13:40         ` Juan Manuel Macías
  2024-01-23  7:41           ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 29+ messages in thread
From: Juan Manuel Macías @ 2024-01-22 13:40 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Pedro Andres Aranda Gutierrez, Org Mode List

Ihor Radchenko writes:

> Juan Manuel Macías <maciaschain@posteo.net> writes:
>
>> Pedro Andres Aranda Gutierrez writes:
>>
>>> +#+begin_example
>>> +,#+latex_class_options: [greek,spanish,oneside]
>>> +,#+language: es
>>> +,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
>>> +,#+latex_header: \usepackage{alphabeta} % to support greek script
>>> +#+end_example
>>
>> I think this example doesn't take advantage of the AUTO facility, which
>> is what the section is about.

> Do you have any suggestions how to improve the patch?

I would give an example that did include the AUTO 'facility', to unify
with the rest of the examples in the section:

#+language: es
#+latex_header: \usepackage[greek,ngerman,AUTO]{babel}
#+latex_header: \usepackage{alphabeta} % to support greek script

It is also said in the patch that this example is for pdfTeX, but it
works equally well for LuaTeX and XeTeX, since Babel and alphabeta
packages support both engines. However, the alphabeta package is not a
specific package for writing texts in Greek. Rather, according to the
package documentation: "The alphabeta package makes the standard macros
for Greek letters in mathematical mode also available in text mode." In
pdfTeX it is useful because you can enter the Greek input directly in
Unicode. But in LuaTeX or XeTeX it would be unnecessary, since Greek can
be written directly, without the help of additional packages.

>> ... Btw, maybe it would be nice to extend ''AUTO'' to
>> latex_class_options and \PassOptionsToPackage? Something like:
>
> It would really be nice to have an ox-latex maintainer who is deeply
> familiar with LaTeX :)

My knowledge of LaTeX (and Elisp) has huge gaps :-). Of course, I am
willing to learn everything I can. And, naturally, I would like to help
in any way I can. But my main problem (currently) is the lack of time to
dedicate myself to it. My presence on this list is intermittent, and
that for a maintainer is horrible. Maybe in a few months (spring
perhaps), when my personal situation stabilizes a little, I could
consider it...

Best regards,

Juan Manuel 



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-22 13:40         ` Juan Manuel Macías
@ 2024-01-23  7:41           ` Pedro Andres Aranda Gutierrez
  2024-01-24 16:25             ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-01-23  7:41 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: Ihor Radchenko, Org Mode List


[-- Attachment #1.1: Type: text/plain, Size: 2920 bytes --]

Hi,

Attached is a _proof of concept_ for supporting AUTO in
\usepackage{fontenc}. Just an idea of how things could evolve.
This only uses a variable you can define as directory or file local to
control what is generated in the LaTeX file.
Could be expanded in the future to check #+language:

Best, /PA

On Mon, 22 Jan 2024 at 14:40, Juan Manuel Macías <maciaschain@posteo.net>
wrote:

> Ihor Radchenko writes:
>
> > Juan Manuel Macías <maciaschain@posteo.net> writes:
> >
> >> Pedro Andres Aranda Gutierrez writes:
> >>
> >>> +#+begin_example
> >>> +,#+latex_class_options: [greek,spanish,oneside]
> >>> +,#+language: es
> >>> +,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
> >>> +,#+latex_header: \usepackage{alphabeta} % to support greek script
> >>> +#+end_example
> >>
> >> I think this example doesn't take advantage of the AUTO facility, which
> >> is what the section is about.
>
> > Do you have any suggestions how to improve the patch?
>
> I would give an example that did include the AUTO 'facility', to unify
> with the rest of the examples in the section:
>
> #+language: es
> #+latex_header: \usepackage[greek,ngerman,AUTO]{babel}
> #+latex_header: \usepackage{alphabeta} % to support greek script
>
> It is also said in the patch that this example is for pdfTeX, but it
> works equally well for LuaTeX and XeTeX, since Babel and alphabeta
> packages support both engines. However, the alphabeta package is not a
> specific package for writing texts in Greek. Rather, according to the
> package documentation: "The alphabeta package makes the standard macros
> for Greek letters in mathematical mode also available in text mode." In
> pdfTeX it is useful because you can enter the Greek input directly in
> Unicode. But in LuaTeX or XeTeX it would be unnecessary, since Greek can
> be written directly, without the help of additional packages.
>
> >> ... Btw, maybe it would be nice to extend ''AUTO'' to
> >> latex_class_options and \PassOptionsToPackage? Something like:
> >
> > It would really be nice to have an ox-latex maintainer who is deeply
> > familiar with LaTeX :)
>
> My knowledge of LaTeX (and Elisp) has huge gaps :-). Of course, I am
> willing to learn everything I can. And, naturally, I would like to help
> in any way I can. But my main problem (currently) is the lack of time to
> dedicate myself to it. My presence on this list is intermittent, and
> that for a maintainer is horrible. Maybe in a few months (spring
> perhaps), when my personal situation stabilizes a little, I could
> consider it...
>
> Best regards,
>
> Juan Manuel
>
>

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #1.2: Type: text/html, Size: 3828 bytes --]

[-- Attachment #2: 0001-PoC-support-AUTO-for-the-fontenc-package-in-LaTeX-ex.patch --]
[-- Type: text/x-patch, Size: 4180 bytes --]

From 66634498275a4dbea4cb8dc225db28bdea1bdf1a Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paaguti@gmail.com>
Date: Tue, 23 Jan 2024 08:31:46 +0100
Subject: [PATCH] PoC: support AUTO for the fontenc package in LaTeX exports

* lisp/org.el: Add `org-latex-fontenc' to support translation for
  \usepackage[AUTO]{fontenc}

* lisp/ox-latex.el: Implement rudimentary translation for the above

---
 lisp/org.el      | 17 ++++++++++++-----
 lisp/ox-latex.el | 36 ++++++++++++++++++++++++------------
 2 files changed, 36 insertions(+), 17 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index cf9abafac..d4356e15d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3401,9 +3401,16 @@ header, or they will be appended."
 	      x))
 	  (default-value var)))
 
+(defcustom org-latex-fontenc "T1"
+  "The fontenc for the file. Customise to LGR,T1 when including
+Greek, etc."
+  :group 'org-export-latex
+  :type 'string
+  :safe #'stringp)
+
 (defcustom org-latex-default-packages-alist
   '(("AUTO" "inputenc"  t ("pdflatex"))
-    ("T1"   "fontenc"   t ("pdflatex"))
+    ("AUTO" "fontenc"   t ("pdflatex"))
     (""     "graphicx"  t)
     (""     "longtable" nil)
     (""     "wrapfig"   nil)
@@ -15159,20 +15166,20 @@ INCREMENT-STEP divisor."
 	(setq hour (mod hour 24))
 	(setq pos-match-group 1
               new (format "-%02d:%02d" hour minute)))
-       
+
        ((org-pos-in-match-range pos 6) ;; POS on "dmwy" repeater char.
 	(setq pos-match-group 6
               new (car (rassoc (+ nincrements (cdr (assoc (match-string 6 ts-string) idx))) idx))))
-       
+
        ((org-pos-in-match-range pos 5) ;; POS on X in "Xd" repeater.
 	(setq pos-match-group 5
               ;; Never drop below X=1.
               new (format "%d" (max 1 (+ nincrements (string-to-number (match-string 5 ts-string)))))))
-       
+
        ((org-pos-in-match-range pos 9) ;; POS on "dmwy" repeater in warning interval.
 	(setq pos-match-group 9
               new (car (rassoc (+ nincrements (cdr (assoc (match-string 9 ts-string) idx))) idx))))
-       
+
        ((org-pos-in-match-range pos 8) ;; POS on X in "Xd" in warning interval.
 	(setq pos-match-group 8
               ;; Never drop below X=0.
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 57ea66ef1..6da8b8e53 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1639,6 +1639,17 @@ For non-floats, see `org-latex--wrap-label'."
 	      (org-trim label)
 	      (org-export-data main info))))))
 
+(defun org-latex-guess-fontenc (header)
+  "Set the fontenc.
+
+This is currently a copy of `org-latex-guess-inputenc'.
+Currently only goes for `org-latex-fontenc', but can be extended.
+Replaces AUTO for the font encoding string."
+  (let ((fenc org-latex-fontenc))
+    (if (not fenc) header
+      (replace-regexp-in-string "\\\\usepackage\\[\\(AUTO\\)\\]{fontenc}"
+                                fenc header t nil 1))))
+
 (defun org-latex-guess-inputenc (header)
   "Set the coding system in inputenc to what the buffer is.
 
@@ -1989,18 +2000,19 @@ specified in `org-latex-default-packages-alist' or
 	      (user-error "Unknown LaTeX class `%s'" class))))
     (org-latex-guess-polyglossia-language
      (org-latex-guess-babel-language
-      (org-latex-guess-inputenc
-       (org-element-normalize-string
-	(org-splice-latex-header
-	 class-template
-	 (org-latex--remove-packages org-latex-default-packages-alist info)
-	 (org-latex--remove-packages org-latex-packages-alist info)
-	 snippet?
-	 (mapconcat #'org-element-normalize-string
-		    (list (plist-get info :latex-header)
-			  (and (not snippet?)
-			       (plist-get info :latex-header-extra)))
-		    ""))))
+      (org-latex-guess-fontenc
+       (org-latex-guess-inputenc
+        (org-element-normalize-string
+	 (org-splice-latex-header
+	  class-template
+	  (org-latex--remove-packages org-latex-default-packages-alist info)
+	  (org-latex--remove-packages org-latex-packages-alist info)
+	  snippet?
+	  (mapconcat #'org-element-normalize-string
+		     (list (plist-get info :latex-header)
+			   (and (not snippet?)
+			        (plist-get info :latex-header-extra)))
+		     "")))))
       info)
      info)))
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-23  7:41           ` Pedro Andres Aranda Gutierrez
@ 2024-01-24 16:25             ` Ihor Radchenko
  2024-01-25  7:25               ` Pedro A. Aranda
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-01-24 16:25 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Juan Manuel Macías, Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> Attached is a _proof of concept_ for supporting AUTO in
> \usepackage{fontenc}. Just an idea of how things could evolve.
> This only uses a variable you can define as directory or file local to
> control what is generated in the LaTeX file.
> Could be expanded in the future to check #+language:

Thanks!

> +(defcustom org-latex-fontenc "T1"
> +  "The fontenc for the file. Customise to LGR,T1 when including
> +Greek, etc."
> +  :group 'org-export-latex
> +  :type 'string
> +  :safe #'stringp)

Is there a list of available values somewhere?
https://latexref.xyz/fontenc-package.html only lists OT1, OMS, OML, T1,
and TS1. However, many more are clearly available.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-24 16:25             ` Ihor Radchenko
@ 2024-01-25  7:25               ` Pedro A. Aranda
  2024-01-25 13:41                 ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Pedro A. Aranda @ 2024-01-25  7:25 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Juan Manuel Macías, Org Mode List

Hi again

As stated, this was only a PoC. If you find it useful, I would give it a 
go in the free window. I'm also playing with 
org-latex-default-packages-alist, refining it to use fontspec in 
lualatex and xetex and restricting inputenc and fontenc to pdflatex only.

Best, /PA

On 24/1/24 17:25, Ihor Radchenko wrote:
> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
>> Attached is a _proof of concept_ for supporting AUTO in
>> \usepackage{fontenc}. Just an idea of how things could evolve.
>> This only uses a variable you can define as directory or file local to
>> control what is generated in the LaTeX file.
>> Could be expanded in the future to check #+language:
> Thanks!
>
>> +(defcustom org-latex-fontenc "T1"
>> +  "The fontenc for the file. Customise to LGR,T1 when including
>> +Greek, etc."
>> +  :group 'org-export-latex
>> +  :type 'string
>> +  :safe #'stringp)
> Is there a list of available values somewhere?
> https://latexref.xyz/fontenc-package.html only lists OT1, OMS, OML, T1,
> and TS1. However, many more are clearly available.
>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-25  7:25               ` Pedro A. Aranda
@ 2024-01-25 13:41                 ` Ihor Radchenko
  2024-01-25 16:54                   ` Pedro A. Aranda
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-01-25 13:41 UTC (permalink / raw)
  To: Pedro A. Aranda; +Cc: Juan Manuel Macías, Org Mode List

"Pedro A. Aranda" <paaguti@gmail.com> writes:

> As stated, this was only a PoC. If you find it useful, I would give it a 
> go in the free window.

I understand.
My question is to clarify how useful it is.
Because I am not deeply familiar with how fontenc works for non-English
languages, it is hard to judge how useful it will be in practice.

> ... I'm also playing with 
> org-latex-default-packages-alist, refining it to use fontspec in 
> lualatex and xetex and restricting inputenc and fontenc to pdflatex only.

Aren't inputenc and fontenc already restricted to pdflatex only?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-25 13:41                 ` Ihor Radchenko
@ 2024-01-25 16:54                   ` Pedro A. Aranda
  2024-01-26 13:28                     ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Pedro A. Aranda @ 2024-01-25 16:54 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Juan Manuel Macías, Org Mode List

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]

Hi

I've been reading a bit. What I propose is an alternative way to handle 
all the tricky parts of font and character handling with fontspec in 
lualatex and xetex. This package restricts the use of the ams* packages 
to pdflatex, because fontenc handles that internally and produces 
package collisions.

Attached is the final version of the patch.

Best, /PA

On 25/1/24 14:41, Ihor Radchenko wrote:
> "Pedro A. Aranda" <paaguti@gmail.com> writes:
>
>> As stated, this was only a PoC. If you find it useful, I would give it a
>> go in the free window.
> I understand.
> My question is to clarify how useful it is.
> Because I am not deeply familiar with how fontenc works for non-English
> languages, it is hard to judge how useful it will be in practice.
>
>> ... I'm also playing with
>> org-latex-default-packages-alist, refining it to use fontspec in
>> lualatex and xetex and restricting inputenc and fontenc to pdflatex only.
> Aren't inputenc and fontenc already restricted to pdflatex only?
>

[-- Attachment #2: 0001-Refine-font-management-for-lualatex-and-xetex.patch --]
[-- Type: text/x-patch, Size: 1673 bytes --]

From 481a35750fcb4098fe469efc80623c5c289b6f9f Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paaguti@gmail.com>
Date: Thu, 25 Jan 2024 17:47:15 +0100
Subject: [PATCH] Refine font management for lualatex and xetex

---
 lisp/org.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

 lisp/org.el: switch to fontspec for character and font management
   in lualatex and xetex. This implies explicitly importing the
   ams* packages is only needed with pdflatex.

diff --git a/lisp/org.el b/lisp/org.el
index cf9abafac..f50531e7e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3402,15 +3402,16 @@ header, or they will be appended."
 	  (default-value var)))

 (defcustom org-latex-default-packages-alist
-  '(("AUTO" "inputenc"  t ("pdflatex"))
+  '((""     "fontspec"  t ("lualatex" "xetex"))
+    ("AUTO" "inputenc"  t ("pdflatex"))
     ("T1"   "fontenc"   t ("pdflatex"))
     (""     "graphicx"  t)
     (""     "longtable" nil)
     (""     "wrapfig"   nil)
     (""     "rotating"  nil)
     ("normalem" "ulem"  t)
-    (""     "amsmath"   t)
-    (""     "amssymb"   t)
+    (""     "amsmath"   t ("pdflatex"))
+    (""     "amssymb"   t ("pdflatex"))
     (""     "capt-of"   nil)
     (""     "hyperref"  nil))
   "Alist of default packages to be inserted in the header.
@@ -3421,6 +3422,7 @@ incompatibility with another package you are using.
 The packages in this list are needed by one part or another of
 Org mode to function properly:

+- fontspec: for font ans character selection in lualatex and xetex
 - inputenc, fontenc:  for basic font and character selection
 - graphicx: for including images
 - longtable: For multipage tables
--
2.34.1

^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-25 16:54                   ` Pedro A. Aranda
@ 2024-01-26 13:28                     ` Ihor Radchenko
  2024-01-26 17:49                       ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-01-26 13:28 UTC (permalink / raw)
  To: Pedro A. Aranda; +Cc: Juan Manuel Macías, Org Mode List

"Pedro A. Aranda" <paaguti@gmail.com> writes:

> I've been reading a bit. What I propose is an alternative way to handle 
> all the tricky parts of font and character handling with fontspec in 
> lualatex and xetex. This package restricts the use of the ams* packages 
> to pdflatex, because fontenc handles that internally and produces 
> package collisions.

> Attached is the final version of the patch.

Thanks!
May you also add a comment to the code explaining the rationale right there?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-26 13:28                     ` Ihor Radchenko
@ 2024-01-26 17:49                       ` Pedro Andres Aranda Gutierrez
  2024-01-28 13:47                         ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-01-26 17:49 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Juan Manuel Macías, Org Mode List


[-- Attachment #1.1: Type: text/plain, Size: 1149 bytes --]

Hi,

Here you are. I hope the couple of words suffice ;-)

Best, /PA

On Fri, 26 Jan 2024 at 14:25, Ihor Radchenko <yantar92@posteo.net> wrote:

> "Pedro A. Aranda" <paaguti@gmail.com> writes:
>
> > I've been reading a bit. What I propose is an alternative way to handle
> > all the tricky parts of font and character handling with fontspec in
> > lualatex and xetex. This package restricts the use of the ams* packages
> > to pdflatex, because fontenc handles that internally and produces
> > package collisions.
>
> > Attached is the final version of the patch.
>
> Thanks!
> May you also add a comment to the code explaining the rationale right
> there?
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #1.2: Type: text/html, Size: 2120 bytes --]

[-- Attachment #2: 0001-Refine-font-management-for-lualatex-and-xetex.patch --]
[-- Type: text/x-patch, Size: 1698 bytes --]

From cc6ea05f1fc31aafb3db737bf033086422aa770f Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paaguti@gmail.com>
Date: Fri, 26 Jan 2024 18:46:14 +0100
Subject: [PATCH] Refine font management for lualatex and xetex

---
 lisp/org.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

lisp/org.el: Use fontspec for lualatex and xetex in 
  org-latex-default-packages-alist

diff --git a/lisp/org.el b/lisp/org.el
index 796545392..24ef515f9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3421,15 +3421,17 @@ header, or they will be appended."
 	  (default-value var)))
 
 (defcustom org-latex-default-packages-alist
-  '(("AUTO" "inputenc"  t ("pdflatex"))
+  '((""     "amsmath"   t ("lualatex" "xetex"))
+    (""     "fontspec"  t ("lualatex" "xetex"))
+    ("AUTO" "inputenc"  t ("pdflatex"))
     ("T1"   "fontenc"   t ("pdflatex"))
     (""     "graphicx"  t)
     (""     "longtable" nil)
     (""     "wrapfig"   nil)
     (""     "rotating"  nil)
     ("normalem" "ulem"  t)
-    (""     "amsmath"   t)
-    (""     "amssymb"   t)
+    (""     "amsmath"   t ("pdflatex"))
+    (""     "amssymb"   t ("pdflatex"))
     (""     "capt-of"   nil)
     (""     "hyperref"  nil))
   "Alist of default packages to be inserted in the header.
@@ -3440,6 +3442,8 @@ incompatibility with another package you are using.
 The packages in this list are needed by one part or another of
 Org mode to function properly:
 
+- fontspec: for font ans character selection in lualatex and xetex
+    if you use fontspec, you need to add amsmath /before/
 - inputenc, fontenc:  for basic font and character selection
 - graphicx: for including images
 - longtable: For multipage tables
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-26 17:49                       ` Pedro Andres Aranda Gutierrez
@ 2024-01-28 13:47                         ` Ihor Radchenko
  2024-01-28 17:02                           ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-01-28 13:47 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Juan Manuel Macías, Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

>> "Pedro A. Aranda" <paaguti@gmail.com> writes:
>>
>> > I've been reading a bit. What I propose is an alternative way to handle
>> > all the tricky parts of font and character handling with fontspec in
>> > lualatex and xetex. This package restricts the use of the ams* packages
>> > to pdflatex, because fontenc handles that internally and produces
>> > package collisions.
>>
>> > Attached is the final version of the patch.
>>
>> Thanks!
>> May you also add a comment to the code explaining the rationale right
>> there?

> Here you are. I hope the couple of words suffice ;-)

Sorry, I was not clear.
I did not mean to ask about amending the docstring.
I meant literal code comments, explaining why we have duplicate amsmath
entries and why we restrict certain packages to specific compilers.

Also, the above quoted paragraph with rationale of the patch should go
into the commit message. See
https://orgmode.org/worg/org-contribute.html#commit-messages

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-28 13:47                         ` Ihor Radchenko
@ 2024-01-28 17:02                           ` Pedro Andres Aranda Gutierrez
  2024-01-29 13:28                             ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-01-28 17:02 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Juan Manuel Macías, Org Mode List


[-- Attachment #1.1: Type: text/plain, Size: 1676 bytes --]

No worries.. next try ;-)

Best, /PA

On Sun, 28 Jan 2024 at 14:43, Ihor Radchenko <yantar92@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> >> "Pedro A. Aranda" <paaguti@gmail.com> writes:
> >>
> >> > I've been reading a bit. What I propose is an alternative way to
> handle
> >> > all the tricky parts of font and character handling with fontspec in
> >> > lualatex and xetex. This package restricts the use of the ams*
> packages
> >> > to pdflatex, because fontenc handles that internally and produces
> >> > package collisions.
> >>
> >> > Attached is the final version of the patch.
> >>
> >> Thanks!
> >> May you also add a comment to the code explaining the rationale right
> >> there?
>
> > Here you are. I hope the couple of words suffice ;-)
>
> Sorry, I was not clear.
> I did not mean to ask about amending the docstring.
> I meant literal code comments, explaining why we have duplicate amsmath
> entries and why we restrict certain packages to specific compilers.
>
> Also, the above quoted paragraph with rationale of the patch should go
> into the commit message. See
> https://orgmode.org/worg/org-contribute.html#commit-messages
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #1.2: Type: text/html, Size: 2910 bytes --]

[-- Attachment #2: 0001-Refine-packages-for-font-management.patch --]
[-- Type: text/x-patch, Size: 3690 bytes --]

From 0beed8846195717e6db051033cac8fd942f89c53 Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda Gutierrez" <paaguti@gmail.com>
Date: Sun, 28 Jan 2024 17:51:23 +0100
Subject: [PATCH] Refine packages for font management

* lisp/org.el: Change `org-latex-default-packages-alist' to
refine font management depending on the latex compiler.

Differentiate between pdflatex and lualatex/xetex
packages for font management. lualatex/xetex should use
fontspec instead of fontenc/inputenc. When using
fontspec, you need to load amsmath before fontspec 
and you don't need amssymb.
  
---

 lisp/org.el | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 796545392..539a128f1 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3421,15 +3421,21 @@ header, or they will be appended."
 	  (default-value var)))
 
 (defcustom org-latex-default-packages-alist
-  '(("AUTO" "inputenc"  t ("pdflatex"))
+  '(;; amsmath before fontspec for lualatex and xetex
+    (""     "amsmath"   t ("lualatex" "xetex"))
+    ;; fontspec ASAP for lualatex and xetex
+    (""     "fontspec"  t ("lualatex" "xetex"))
+    ;; inputenc and fontenc are for pdflatex only
+    ("AUTO" "inputenc"  t ("pdflatex"))
     ("T1"   "fontenc"   t ("pdflatex"))
     (""     "graphicx"  t)
     (""     "longtable" nil)
     (""     "wrapfig"   nil)
     (""     "rotating"  nil)
     ("normalem" "ulem"  t)
-    (""     "amsmath"   t)
-    (""     "amssymb"   t)
+    ;; amsmath and amssymb after inputenc/fontenc for pdflatex
+    (""     "amsmath"   t ("pdflatex"))
+    (""     "amssymb"   t ("pdflatex"))
     (""     "capt-of"   nil)
     (""     "hyperref"  nil))
   "Alist of default packages to be inserted in the header.
@@ -3440,7 +3446,9 @@ incompatibility with another package you are using.
 The packages in this list are needed by one part or another of
 Org mode to function properly:
 
+- fontspec: for font and character selection in lualatex and xetex
 - inputenc, fontenc:  for basic font and character selection
+  in pdflatex
 - graphicx: for including images
 - longtable: For multipage tables
 - wrapfig: for figure placement
@@ -3448,8 +3456,8 @@ Org mode to function properly:
 - ulem: for underline and strike-through
 - amsmath: for subscript and superscript and math environments
 - amssymb: for various symbols used for interpreting the entities
-  in `org-entities'.  You can skip some of this package if you don't
-  use any of the symbols.
+  in `org-entities'.  You can skip some of this package if you
+  don't use any of the symbols.
 - capt-of: for captions outside of floats
 - hyperref: for cross references
 
@@ -15211,20 +15219,20 @@ INCREMENT-STEP divisor."
 	(setq hour (mod hour 24))
 	(setq pos-match-group 1
               new (format "-%02d:%02d" hour minute)))
-       
+
        ((org-pos-in-match-range pos 6) ;; POS on "dmwy" repeater char.
 	(setq pos-match-group 6
               new (car (rassoc (+ nincrements (cdr (assoc (match-string 6 ts-string) idx))) idx))))
-       
+
        ((org-pos-in-match-range pos 5) ;; POS on X in "Xd" repeater.
 	(setq pos-match-group 5
               ;; Never drop below X=1.
               new (format "%d" (max 1 (+ nincrements (string-to-number (match-string 5 ts-string)))))))
-       
+
        ((org-pos-in-match-range pos 9) ;; POS on "dmwy" repeater in warning interval.
 	(setq pos-match-group 9
               new (car (rassoc (+ nincrements (cdr (assoc (match-string 9 ts-string) idx))) idx))))
-       
+
        ((org-pos-in-match-range pos 8) ;; POS on X in "Xd" in warning interval.
 	(setq pos-match-group 8
               ;; Never drop below X=0.
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-28 17:02                           ` Pedro Andres Aranda Gutierrez
@ 2024-01-29 13:28                             ` Ihor Radchenko
  2024-01-29 14:34                               ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-01-29 13:28 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Juan Manuel Macías, Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> From: "Pedro A. Aranda Gutierrez" <paaguti@gmail.com>
> Date: Sun, 28 Jan 2024 17:51:23 +0100
> Subject: [PATCH] Refine packages for font management

Thanks!
Applied, onto main. I cleaned up irrelevant whitespace changes and
amended the commit message, adding double space between sentences,
fixing the changelog entry, and indicating what part of Org the patch
changes in the first line.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a4a880d1f

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-29 13:28                             ` Ihor Radchenko
@ 2024-01-29 14:34                               ` Pedro Andres Aranda Gutierrez
  2024-01-29 14:51                                 ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-01-29 14:34 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Juan Manuel Macías, Org Mode List

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

Awesome, thanks! Could we back-port that to the emacs-sync tree? The sooner
we have it emacs for
people to use, the better

On Mon, 29 Jan 2024 at 14:25, Ihor Radchenko <yantar92@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> > From: "Pedro A. Aranda Gutierrez" <paaguti@gmail.com>
> > Date: Sun, 28 Jan 2024 17:51:23 +0100
> > Subject: [PATCH] Refine packages for font management
>
> Thanks!
> Applied, onto main. I cleaned up irrelevant whitespace changes and
> amended the commit message, adding double space between sentences,
> fixing the changelog entry, and indicating what part of Org the patch
> changes in the first line.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a4a880d1f
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 2340 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-29 14:34                               ` Pedro Andres Aranda Gutierrez
@ 2024-01-29 14:51                                 ` Ihor Radchenko
  2024-01-29 14:51                                   ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-01-29 14:51 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Juan Manuel Macías, Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> Awesome, thanks! Could we back-port that to the emacs-sync tree? The sooner
> we have it emacs for
> people to use, the better

I do not view this as a trivial or critical change. Hence, for next
release only.
See https://orgmode.org/worg/org-maintenance.html#branches

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-29 14:51                                 ` Ihor Radchenko
@ 2024-01-29 14:51                                   ` Pedro Andres Aranda Gutierrez
  0 siblings, 0 replies; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-01-29 14:51 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Juan Manuel Macías, Org Mode List

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

OK, fine with me...
/PA

On Mon, 29 Jan 2024 at 15:47, Ihor Radchenko <yantar92@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> > Awesome, thanks! Could we back-port that to the emacs-sync tree? The
> sooner
> > we have it emacs for
> > people to use, the better
>
> I do not view this as a trivial or critical change. Hence, for next
> release only.
> See https://orgmode.org/worg/org-maintenance.html#branches
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 1940 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-01-21 17:11   ` Pedro Andres Aranda Gutierrez
  2024-01-21 17:47     ` Juan Manuel Macías
@ 2024-02-09 23:10     ` Ihor Radchenko
  2024-02-10  6:13       ` Pedro Andres Aranda Gutierrez
  1 sibling, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-02-09 23:10 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez, Juan Manuel Macías; +Cc: Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> Subject: [PATCH] org-manual: Add multi-language babel example
>
> org-manual.org: Add multi-language babel example
>
> * doc/org-manual.org: Add an example for the LaTeX header commands
> needed to export multi-language documents to pdflatex. In this case
> we need to use and configure the babel package appropriately.

AFAIU, Juan's questions about the patch have not been addressed, and the
discussion branched into a slightly different topic (not changes to the
manual).

Should I cancel this patch?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-02-09 23:10     ` Ihor Radchenko
@ 2024-02-10  6:13       ` Pedro Andres Aranda Gutierrez
  2024-02-10 14:39         ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-02-10  6:13 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Juan Manuel Macías, Org Mode List

[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]

Hi Ihor,

yes, you are right. The whole thread went astray.
However, I think it might be interesting to keep this as an alternative to
the AUTO stuff...

Anyhow, I'm open to cancelling the patch

Best, /PA

On Sat, 10 Feb 2024 at 00:07, Ihor Radchenko <yantar92@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> > Subject: [PATCH] org-manual: Add multi-language babel example
> >
> > org-manual.org: Add multi-language babel example
> >
> > * doc/org-manual.org: Add an example for the LaTeX header commands
> > needed to export multi-language documents to pdflatex. In this case
> > we need to use and configure the babel package appropriately.
>
> AFAIU, Juan's questions about the patch have not been addressed, and the
> discussion branched into a slightly different topic (not changes to the
> manual).
>
> Should I cancel this patch?
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 2515 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-02-10  6:13       ` Pedro Andres Aranda Gutierrez
@ 2024-02-10 14:39         ` Ihor Radchenko
  2024-02-11  6:22           ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-02-10 14:39 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Juan Manuel Macías, Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> yes, you are right. The whole thread went astray.
> However, I think it might be interesting to keep this as an alternative to
> the AUTO stuff...
>
> Anyhow, I'm open to cancelling the patch

From my point of view, you did not address/reply to

"I think this example doesn't take advantage of the AUTO facility, which
   is what the section is about."

When you do, we can continue moving the proposed patch forward.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-02-10 14:39         ` Ihor Radchenko
@ 2024-02-11  6:22           ` Pedro Andres Aranda Gutierrez
  2024-02-11 11:04             ` Juan Manuel Macías
  0 siblings, 1 reply; 29+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-02-11  6:22 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Juan Manuel Macías, Org Mode List

[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]

My .2 cents in line,
/PA

On Sat, 10 Feb 2024 at 15:36, Ihor Radchenko <yantar92@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> > yes, you are right. The whole thread went astray.
> > However, I think it might be interesting to keep this as an alternative
> to
> > the AUTO stuff...
> >
> > Anyhow, I'm open to cancelling the patch
>
> From my point of view, you did not address/reply to
>
> "I think this example doesn't take advantage of the AUTO facility, which
>    is what the section is about."
>

I agree it does not take advantage of the AUTO facility here, but I
nevertheless think it would
be interesting to show people how to do this. Until we expand the AUTO
facility to cope with
all quirks of multi-language in pdflatex (lualatex and xetex are a
different pair of shoes), a quick
and dirty alternative may be helpful for people. The introductory text
could be

+An alternative approach using ~pdflatex~ and ~babel~ and mixing Latin and
+Greek fonts in the document using the =\PassOptionsToPackage= command
+from =babel= and avoiding the AUTO keyword would be:

instead of:

+Another example using ~pdflatex~ and ~babel~ and mixing Latin and
+Greek fonts in the document using the =\PassOptionsToPackage= command
+from =babel= would be:

Having this example at hand can solve issues until we fully agree on and
implement
AUTO through all the packages involved in multi-language documents in LaTeX.

@Juan: Thanks again for kicking me awake. I'm moving on most of my projects
to
lualatex ;-)

When you do, we can continue moving the proposed patch forward.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 3428 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-02-11  6:22           ` Pedro Andres Aranda Gutierrez
@ 2024-02-11 11:04             ` Juan Manuel Macías
  2024-04-15 12:21               ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Juan Manuel Macías @ 2024-02-11 11:04 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Ihor Radchenko, Org Mode List

Pedro Andres Aranda Gutierrez writes:

> I agree it does not take advantage of the AUTO facility here, but I
> nevertheless think it would
> be interesting to show people how to do this. Until we expand the AUTO
> facility to cope with
> all quirks of multi-language in pdflatex (lualatex and xetex are a
> different pair of shoes), a quick
> and dirty alternative may be helpful for people. The introductory text
> could be

Pedro, the only problem I see with that is that it is an example of
LaTeX rather than Org. The only Org part here is #+LaTeX_header, and in
the entire section it's already made clear enough what it's used for.

Perhaps a brief reminder (the AUTO facility of the previous examples
is very limited) could be added first, and that if the users want to
obtain more complex, or more specific results (like the case you
exemplify for pdfLaTeX) they must put explicit LaTeX code, using
LaTeX_header. And then your example would come, but emphasizing that the
LaTeX documentation must be consulted. wdyt?

My point is that if we abuse examples of this type (at the expense of
"#+latex_header:something"), or "how is this done in LaTeX?", in the end
a LaTeX manual is made instead of Org.

I'm glad you enjoyed the jump to LuaTeX. :-)

Best regards,

Juan Manuel 


-- 
Juan Manuel Macías -- Composición tipográfica, tratamiento de datos, diseño editorial y ortotipografía



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-02-11 11:04             ` Juan Manuel Macías
@ 2024-04-15 12:21               ` Ihor Radchenko
  2024-04-22 20:06                 ` Ihor Radchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Ihor Radchenko @ 2024-04-15 12:21 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: Pedro Andres Aranda Gutierrez, Org Mode List

Juan Manuel Macías <maciaschain@posteo.net> writes:

> Pedro Andres Aranda Gutierrez writes:
>
>> I agree it does not take advantage of the AUTO facility here, but I
>> nevertheless think it would
>> be interesting to show people how to do this. Until we expand the AUTO
>> facility to cope with
>> all quirks of multi-language in pdflatex (lualatex and xetex are a
>> different pair of shoes), a quick
>> and dirty alternative may be helpful for people. The introductory text
>> could be
>
> Pedro, the only problem I see with that is that it is an example of
> LaTeX rather than Org. The only Org part here is #+LaTeX_header, and in
> the entire section it's already made clear enough what it's used for.
>
> Perhaps a brief reminder (the AUTO facility of the previous examples
> is very limited) could be added first, and that if the users want to
> obtain more complex, or more specific results (like the case you
> exemplify for pdfLaTeX) they must put explicit LaTeX code, using
> LaTeX_header. And then your example would come, but emphasizing that the
> LaTeX documentation must be consulted. wdyt?
>
> My point is that if we abuse examples of this type (at the expense of
> "#+latex_header:something"), or "how is this done in LaTeX?", in the end
> a LaTeX manual is made instead of Org.

A gentle ping. This patch is still hanging in the air.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
  2024-04-15 12:21               ` Ihor Radchenko
@ 2024-04-22 20:06                 ` Ihor Radchenko
  0 siblings, 0 replies; 29+ messages in thread
From: Ihor Radchenko @ 2024-04-22 20:06 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: Pedro Andres Aranda Gutierrez, Org Mode List

Ihor Radchenko <yantar92@posteo.net> writes:

> A gentle ping. This patch is still hanging in the air.

Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2024-04-22 20:05 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-21  8:44 New try at multi-lingual export to latex/pdf using pdflatex and babel Pedro Andres Aranda Gutierrez
2024-01-21 13:02 ` Ihor Radchenko
2024-01-21 17:11   ` Pedro Andres Aranda Gutierrez
2024-01-21 17:47     ` Juan Manuel Macías
2024-01-22  6:30       ` Pedro Andres Aranda Gutierrez
2024-01-22  6:47         ` Pedro Andres Aranda Gutierrez
2024-01-22 13:11           ` Juan Manuel Macías
2024-01-22 12:10       ` Ihor Radchenko
2024-01-22 13:40         ` Juan Manuel Macías
2024-01-23  7:41           ` Pedro Andres Aranda Gutierrez
2024-01-24 16:25             ` Ihor Radchenko
2024-01-25  7:25               ` Pedro A. Aranda
2024-01-25 13:41                 ` Ihor Radchenko
2024-01-25 16:54                   ` Pedro A. Aranda
2024-01-26 13:28                     ` Ihor Radchenko
2024-01-26 17:49                       ` Pedro Andres Aranda Gutierrez
2024-01-28 13:47                         ` Ihor Radchenko
2024-01-28 17:02                           ` Pedro Andres Aranda Gutierrez
2024-01-29 13:28                             ` Ihor Radchenko
2024-01-29 14:34                               ` Pedro Andres Aranda Gutierrez
2024-01-29 14:51                                 ` Ihor Radchenko
2024-01-29 14:51                                   ` Pedro Andres Aranda Gutierrez
2024-02-09 23:10     ` Ihor Radchenko
2024-02-10  6:13       ` Pedro Andres Aranda Gutierrez
2024-02-10 14:39         ` Ihor Radchenko
2024-02-11  6:22           ` Pedro Andres Aranda Gutierrez
2024-02-11 11:04             ` Juan Manuel Macías
2024-04-15 12:21               ` Ihor Radchenko
2024-04-22 20:06                 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.