emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: "Juan Manuel Macías" <maciaschain@posteo.net>
Cc: orgmode <emacs-orgmode@gnu.org>,  Maxim Nikulin <manikulin@gmail.com>
Subject: Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists
Date: Mon, 18 Jul 2022 14:44:52 +0800	[thread overview]
Message-ID: <87y1wqhqcb.fsf@localhost> (raw)
In-Reply-To: <87zgh7ssm1.fsf@posteo.net>

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

>> For Max's comment, using plist/alist would make things more clear
>> code-wise for future developers. I always find it annoying when I need
>> to go back and forth checking which element should be second or third or
>> forth in the list. Especially if the variable is used all around the
>> codebase. Though this particular case is not such -
>> `org-latex-language-alist' is used just in few places.
>
> I agree with Maxim and with you that an anonymous list is hardly usable
> for future features. For this new list I followed the style of the
> previous ones and I admit that I was quite conservative. The problem,
> imho, is that with the current org implementation I find it difficult to
> add new features. For example, Babel now has two ways of loading
> languages: the old one, through ldf files, which is the one that Org
> implements and that produces the traditional babel syntax; and the new
> system through ini files, which also incorporates a new syntax with many
> options and variants. New languages have been defined by ini files, but
> cannot be loaded by the old syntax. That is the cause of the asterisks
> in my list: when a language has an asterisk it means that it is only
> served in babel through an ini file and, therefore, the traditional
> syntax cannot be used, so it is not implemented for use in babel. And
> furthermore, the new babel syntax and ini files can only be used with
> the Unicode TeX engines: XeTeX and LuaTeX. This all looks like a puzzle
> (I'm getting dizzy just rereading it :-)), and I don't see a clean and
> sensible way to translate it to Org settings.

Do you refer to the paragraph below when saying that Org implementation
makes it hard to add new features? The rest of the above paragraph
implies that the difficulty is on LaTeX side, not on Org side.

In any case, your existing patch is an already an improvement. I do not
deem it as requirement to apply the patch.

> I also think that the current Org settings for loading languages with
> Polyglossia or Babel is unhelpful and unclear. Also, it depends on
> putting explicit LaTeX code in the document. A code that, in the case of
> Polyglossia, is a fake LaTeX code, because something like this:
>
> \usepackage[french,AUTO]{polyglossia}
>
> is not really the Polyglossia syntax. And it can lead to confusion.

I hope that Timothy's work on more flexible and configurable template
generation can improve things.

> I think this should be reimplemented in the future using a more
> org-centric syntax, using keywords (somehow keeping the
> above for backwards compatibility). I don't know, maybe something like
> this, with a specific keyword for language LaTeX settings:
>
> #+latex_language: es variant:mx babel-ini:t other:en,de,el etc.
>
> In this case, I think it would make more sense to define a more robust
> list, an alist or a plist (as Maxim suggested), leaving the door open to
> a fresh reimplementation of langs in latex export. I can get to work as
> soon as I have some time and finish with other commitments, that will
> keep me busy practically all summer.
>
> WDYT?

This sounds reasonable. Implementing via :options-alist export property
will conform more to the overall design (see the docstring of
org-export-options-alist - it enables a lot of flexibility in terms of
customization, including the option syntax similar to what you proposed).

Best,
Ihor


  reply	other threads:[~2022-07-18  6:45 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-03 15:28 [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists Juan Manuel Macías
2022-07-10  9:25 ` Ihor Radchenko
2022-07-14 12:34   ` Juan Manuel Macías
2022-07-14 15:12     ` Max Nikulin
2022-07-14 15:53       ` Juan Manuel Macías
2022-07-14 18:17         ` Juan Manuel Macías
2022-07-15 12:18           ` Max Nikulin
2022-07-15 14:36             ` Juan Manuel Macías
2022-07-17  9:55     ` Ihor Radchenko
2022-07-17 14:48       ` Juan Manuel Macías
2022-07-18  6:44         ` Ihor Radchenko [this message]
2022-07-18 10:32           ` Juan Manuel Macías
2022-07-18 11:01             ` Juan Manuel Macías
2022-07-18 15:37             ` Max Nikulin
2022-07-18 16:21               ` Juan Manuel Macías
2022-07-19 15:01       ` Juan Manuel Macías
2022-07-19 17:01         ` Max Nikulin
2022-07-19 19:31           ` Juan Manuel Macías
2022-07-20 16:12             ` Max Nikulin
2022-07-20 21:30               ` Juan Manuel Macías
2022-07-21 14:36                 ` Max Nikulin
2022-07-21 15:39                   ` Juan Manuel Macías
2022-07-22 12:16                     ` Max Nikulin
2022-07-22 12:49                       ` Juan Manuel Macías
2022-07-22 14:07                         ` Juan Manuel Macías
2022-07-23 15:19                           ` Max Nikulin
2022-07-23 17:15                             ` Improvements in the default LaTeX preamble (was: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists) Juan Manuel Macías
2022-07-24 12:06                               ` Improvements in the default LaTeX preamble: templates? " Juan Manuel Macías
2022-07-25  9:31                                 ` Ihor Radchenko
2022-07-25 10:45                                   ` Improvements in the default LaTeX preamble: templates? Juan Manuel Macías
2022-07-23  5:01         ` [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists Ihor Radchenko
2022-07-23 13:44           ` BUG " Kai von Fintel
2022-07-23 13:59             ` Ihor Radchenko
2022-07-23 14:07               ` Kai von Fintel
2022-07-23 14:22                 ` Ihor Radchenko
2022-07-23 14:39                   ` Kai von Fintel
2022-07-23 14:50                     ` Ihor Radchenko
2022-07-23 15:53                       ` Juan Manuel Macías
2022-07-24  7:15                         ` Ihor Radchenko
2022-07-24 11:29                           ` Juan Manuel Macías
2022-07-26 11:58                             ` Ihor Radchenko
2022-07-26 16:19                               ` Juan Manuel Macías
2022-07-28 12:36                                 ` Ihor Radchenko
2022-07-23 14:53                     ` Juan Manuel Macías
2022-07-23 14:11           ` Juan Manuel Macías
2022-07-23 14:25             ` Ihor Radchenko
2022-07-23 15:29           ` Max Nikulin
2022-07-24  7:23             ` Ihor Radchenko
2022-07-10 10:51 ` Max Nikulin
2022-07-15 15:38   ` Juan Manuel Macías

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=87y1wqhqcb.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=maciaschain@posteo.net \
    --cc=manikulin@gmail.com \
    /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).