Hi Max, thank you very much. I see we are in violent agreement here. The macro is a real headache and in an ideal world, replicating the functionality of foreign language should involve something that takes a first argument being an Org language name and a second argument with should be the string we want to tag.
Re. inserting commands on character script changes: I still didn't find a simple way to do that and I was about to reply to the thread about the Tamil example with yet another example I have that shows that it is not necessary with babel. Thanks for your insights and comments, /PA On Thu, 17 Jul 2025 at 12:57, Max Nikulin <maniku...@gmail.com> wrote: > > On 16/07/2025 14:41, Pedro Andres Aranda Gutierrez wrote: > > 1. It would be nice to agree on some #+BEGIN_LANG #+END_LANG block for > > the LaTeX exporter to cope with \begin{otherlanguage*} in an > > org-native way > > 2. Ditto for the texten macro > [...] > > #+MACRO: texten @@latex: \textenglish{$1}@@ > [...] > > * {{{texten(regular expression)}}} > > From my point of view, Org macros are not designed for plain text > arguments. Comma as argument separator is a painful pitfall. It is too > easy to lost some text. Some workarounds were discussed in > > Maxim Nikulin. Re: [PATCH] Possibility of using alternative separators > in macros. Wed, 12 May 2021 18:49:25 +0700. > <https://list.orgmode.org/s7gfc6$hj1$1...@ciao.gmane.io> > > $_ as rest arguments including commas may alleviate the issue. Inline > special "blocks" would be more promising however. > > In addition, I think, it should not be a macro per language, it is > better to use single macro with language as first argument. In the case > of babel it can be directly mapped to \foreignlanguage{}{}. > > In simple cases export backend may insert commands when character script > is changed. -- Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler Sagen's Paradeiser, write BE! Year 1 of the New Koprocracy