Panayotis Manganaris <[email protected]> writes:
> I'm on org 9.7.11. I treat the 20250709 version of siunitx as a first
> class citizen for all my documents. The macros \num, \qty, and \unit are
> all protected during export but \ang is escaped. It is an org entity but
> I have entities export disabled in this case.
Hi,
In this case, you will need to mark up the \ang as LaTeX. If it's part of a
=#+LATEX:= line, a =#+BEGIN_EXPORT latex= block, or a
=\begin{environmentname}= LaTeX environment, it will take care of
itself. Otherwise, you can use this syntax:
: A right angle is @@latex:\ang{90}@@ degrees.
If you relax the requirement of having \ang as a first class citizen,
you could save yourself a little typing by defining an Org macro for it:
: #+MACRO: ang @@latex:\ang{90}@@ degrees
:
: A right angle is {{{ang(90)}}} degrees.
A different, riskier way to solve the conflict with less typing would be
to remove the =\ang= entity from the org-entities list (customizing
org-entities-user won't help here). I don't recommend fiddling with
org-entities as a user, and I haven't tested extensively, but this seems
to work:
: (setf (alist-get "ang" org-entities nil 'remove 'equal) nil))
Note that the "ang" entry is redundant; the =\angle= entity exports to
exactly the same result, an angle symbol. So if siunitx is popular and
this conflict is going to crop up often, perhaps we should consider
removing the "ang" entry in org-entities. It would be a breaking change
for a few users, though.
Yours,
Christian