Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Is it possible for the JavaScript syntax highlighter to be extended to color code LaTeX3 code? With the current color coding scheme the code is very difficult to follow.
@morbusg At least if it highlights [\\a-zA-Z:_] it can immediately look better. It shouldn't be that hard to do. At the moment the commands look like a long train with only the first wagon painted:)
Yiannis: I was thinking about how to still have _ as a reserved letter; i.e., support from the same regex file for both TeX and LaTeX3. (/^(?=[^\\])[&_etc.]/ for reserved vs. /^\\(?:[^\\])[\w_]*\b/] for command names [or something along those lines]). I'm not sure how the unioning would handle that.
It really does come down to simultaneously supporting LaTeX2e and LaTeX3 syntax on the site; it's not really possible to distinguish between them without an explicit LaTeX3 or LaTeX2e tag of some sort.
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
_
as a reserved letter; i.e., support from the same regex file for both TeX and LaTeX3. (/^(?=[^\\])[&_etc.]/
for reserved vs./^\\(?:[^\\])[\w_]*\b/]
for command names [or something along those lines]). I'm not sure how the unioning would handle that.LaTeX3
orLaTeX2e
tag of some sort.