On Mon, Jul 21 2025, mahmood sheikh <mahmod.m2...@gmail.com> wrote: > org is unable to recognize expressions of the form `\(\(math\)\)` as a > single nested latex expression. even though i do vaguely recall org being > able to handle this "properly".
No, \(\(math\)\) isn't valid syntax for a latex fragment; the second \) is dropped by design. See [fn:1]: #+begin_quote LaTeX fragments are structured according to one of the following patterns: \NAME BRACKETS \(CONTENTS\) \[CONTENTS\] .... CONTENTS A string consisting of any characters, so long as it does not contain the substring \) in the case of the second template, or \] in the case of the third template. #+end_quote [fn:1] https://orgmode.org/worg/org-syntax.html#text-LaTeX_Fragments > \(\text{some \code{high(x)} here, more \(x\) here}\) is a case where this > could be problematic. > by "recognizing" the expression i mean that org thinks the math expression > is only `\(\(math\)` and the latter `\)` is treated as a separate text. > causing problems when exporting to latex (or in org-latex-preview which > naturally errors out as a result). > > thank you folks. never could say enough to those who work on org-mode since > its been one of the most useful tools for so long to me. Leo