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.

Reply via email to