On 30/05/2026 1:21 pm, Pedro Andres Aranda Gutierrez wrote:
1) not all users may have enough ELisp knowledge to add a hack to their
configuration, specifically when it comes to modifying an alist.
Have you tried the following?
M-x customize-variable RET org-latex-text-markup-alist RET
As Ihor writes it can be improved, but even in the current form it is
usable.
I do not like alists as user options in general and for this variable in
particular, but adding more options is confusing. It adds cognitive load
related to priorities.
2) not all documents you produce may need the hack, so adding config
options may be appealing to people who, like me, need them only
sometimes and don't want to be retouching their Emacs configuration
depending on the doc.
I believed, you like .dir-locals.el files more than me. Anyway you added
another `defcustom' that is not per-document setting, so it behaves in
the same way as `org-latex-text-markup-alist'.
3) export filters... I have also tried a post-export filter, but since
~~ and == both produce \texttt{}, it was difficult to control. Will
continue exploring that.
I had in mind either "parse-tree" or "verbatim". As another option, you
may try to redefine \verb LaTeX macro to add quotes.
Re \verb@@ in captions, you are absolutely right. LaTeX will complain,
but this can be fixed by educating users, i.e. by adding a CAVEAT in the
manual in the lines of
I believe, Org should use non-fragile LaTeX markup in captions and
headings (... and footnotes?) out of the box. A warning to the manual
still might be added.
BTW, instead of posting filtering code to the mailing list, this may be
something for worg... WDYT?
If you are sure that a worg page will have higher rank in search engines
and higher chance (and weight) to be included in AI training set than
worg is better.