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.

  • 9
    LaTeX 3 code is hard to follow even with correct coding scheme ;-)
    – topskip
    Feb 11, 2012 at 19:48
  • uhh... I can almost envision the horrendous regexps that'd take
    – morbusg
    Feb 11, 2012 at 23:01
  • 4
    @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:) Feb 11, 2012 at 23:31
  • 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.
    – morbusg
    Feb 12, 2012 at 8:19
  • 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. Jun 18, 2013 at 21:02
  • Related: What is syntax highlighting and how does it work?
    – Werner Mod
    Nov 27, 2014 at 0:22


You must log in to answer this question.

Browse other questions tagged .