Subject: bug#53749: 29.0.50; [PATCH] Xref backend for TeX buffers

From: Arash Esbati <[email-masked]>
Date: Sat, 04 May 2024 23:15:55 +0200

Stefan Monnier <[email-masked]> writes:

> But that is *also* valid LaTeX, with a different meaning (i.e. where
> `_` has its subscript meaning).  So we need some other info in order to
> know which of the two we're dealing with.

That's true.  AFAIK, one has to deal with:

  • \_ in ordinary text like foo\_bar
  • _ in math mode like $a_b$
  • expl3 macros like \tl_set:Nn
  • expl3 macros like \__kernel_kern:n

> Maybe that info is simply "assume LaTeX3 if the _ is followed by several
> letters" or some such heuristic, but the comment should say so.

Last time I looked at this, my conclusion was: Deal with \_ and _ in
usual .tex files and expect expl3 macros in .dtx file only.

Best, Arash