emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org, Ihor Radchenko <yantar92@posteo.net>
Subject: Re: [patch] Fixes and improvements in org-latex-language-alist
Date: Tue, 12 Sep 2023 18:12:33 +0000	[thread overview]
Message-ID: <87sf7j2rce.fsf@posteo.net> (raw)
In-Reply-To: <udpvmr$lt8$1@ciao.gmane.io> (Max Nikulin's message of "Tue, 12 Sep 2023 22:22:00 +0700")

Max Nikulin writes:

>>> Every piece of code accessing this public constant must implement
>>> fallback from e.g. "de-ch" (or de_CH) to "de". Or to "en" for an
>>> unsupported language.
>> Not necessarily. I mostly thought about some unconventional code
>> that
>> uses the constant for some reason unexpected to us. We do not want to
>> break that.
>
> My point is that direct usage of `org-latex-language-alist' should be
> discouraged.

I understand that org-latex-language-alist is a temporary patch waiting
for something better, and is very dependent on
org-latex-guess-babel-language and
org-latex-guess-polyglossia-language[1], two functions that (IMHO)
should be made obsolete in the future. Keep in mind that the old
org-latex-babel-language-alist was more focused on the old babel ldf
files, which is a limited number of languages. Polyglossia also has a
rather limited number of supported languages. The ini files system is
more extensive and more flexible. One can even define new "virtual"
languages using \babelprovide, or write new custom ini files. With this
scenario a closed list like org-latex-language-alist doesn't make much
sense. I actually think that there would be no need for any ad hoc list
of this type for latex, and everything should be delegated to a global
language name translation system like the one Ihor is developing. I
think that would be the first stone to build native Org multilingual
support.

[1] I think also that in this function there was an unhappy decision:
using a syntax that is not from polyglossia but from babel leaves the
user with little freedom of action, since polyglossia has more 'keyval'
options, not only language variants. For example, this (real polyglossia
code):

\usepackage{polyglossia}
\setmainlanguage{spanish}
\setotherlanguage[numerals=arabic]{chinese}

cannot be translated from (fake polyglossia code):

#+language: es
#+LaTeX_Header: \usepackage[chinese,AUTO]{polyglossia}

--
Juan Manuel Macías

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com


  reply	other threads:[~2023-09-12 19:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 14:55 ox-latex language handling in Org-9.5 vs 9.6 Max Nikulin
2023-09-06 22:20 ` Juan Manuel Macías
2023-09-07 10:38   ` Max Nikulin
2023-09-07 11:50   ` Ihor Radchenko
2023-09-07 14:19     ` Juan Manuel Macías
2023-09-07 14:49       ` Max Nikulin
2023-09-08 10:30         ` Max Nikulin
2023-09-08 14:42           ` Juan Manuel Macías
2023-09-08 19:02             ` [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6) Juan Manuel Macías
2023-09-09  9:11               ` Ihor Radchenko
2023-09-09 10:36                 ` [patch] Fixes and improvements in org-latex-language-alist Juan Manuel Macías
2023-09-09 11:33                   ` Ihor Radchenko
2023-09-09 23:59                     ` Juan Manuel Macías
2023-09-10  7:55                       ` Ihor Radchenko
2023-09-10 11:06                         ` Juan Manuel Macías
2023-09-10 13:36                           ` Ihor Radchenko
2023-09-10 16:15                 ` [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6) Max Nikulin
2023-09-10 16:52                   ` Ihor Radchenko
2023-09-10 21:15                     ` [patch] Fixes and improvements in org-latex-language-alist Juan Manuel Macías
2023-09-11  8:32                       ` Ihor Radchenko
2023-09-11 17:06                     ` [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6) Max Nikulin
2023-09-12  9:05                       ` Ihor Radchenko
2023-09-12 15:22                         ` Max Nikulin
2023-09-12 18:12                           ` Juan Manuel Macías [this message]
2023-09-15  9:54                             ` [patch] Fixes and improvements in org-latex-language-alist Ihor Radchenko
2023-09-15  9:51                           ` [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6) Ihor Radchenko

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sf7j2rce.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    --cc=yantar92@posteo.net \
    /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/org-mode.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).