Hello, hero...@gentoo.org writes:
> Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: >> Unfortunately, this is ambiguous with Org macro syntax. For example, it >> would match: >> >> \alpha{{{macro(arg)}}} >> >> which is an entity followed by a macro. > > Err, insert a white space? > > \alpha {{{macro(arg)}}} Well, it may not be equivalent, depending on the macro. Also, this is not the point. \alpha{{{macro(arg)}}} is valid, so we have to parse it as something. In this case, there are two possible interpretations. I want to avoid it. > Or expand the macro before latex-or-entity matching. Macro expansion only happens at the beginning of the export process. The problem you want to solve isn't necessarily tied to the export mechanism. Also, as you mention "latex-or-entity", which doesn't exist anymore, you should look at the parsing code in master instead of maint, in particular to `org-element-latex-fragment-parser'. Maybe the mechanism used to find a macro can be improved to match more of them without matching anything else. Regards, -- Nicolas Goaziou