3

I understand why StackOverflow does not have syntax highlighting for inline code, as there is simply not enough code for the syntax highlighting system to guess the language being used (at least I assume that this is the reason). Therefore, only

displayed code

receives syntax highlighting.

But TeX.SX is different, as probably 99.9 % of all code posted here is TeX code. So why is inline code not syntax highlighted here, and could this be changed?

3
  • Note that for Stack Overflow the tags on the question determine the highlight language, so also there the system doesn't need to guess except for questions with tags that don't have a language associated to it.
    – Marijn
    Jan 5 at 10:52
  • 1
    For some background see for example meta.stackexchange.com/questions/2737/…, where it is argued that coloring small inline snippets does not provide much readability benefit. Quote: 'inline code isn't really for "code", at least not for code complex enough to benefit from syntactic analysis. It's just to set apart keywords, identifiers, and options from surrounding text. If it's more complex than that, make it a block quote.'
    – Marijn
    Jan 5 at 10:56
  • 1
    Another discussion at meta.stackoverflow.com/questions/318834/… where an additional argument is that the snippets are so short that the highlighter, even when it knows the language, will assign the wrong colors because it doesn't know if something is a function or a variable or an operator etc. On our site that does not really apply because the only color we have is blue, but for other languages I see the point.
    – Marijn
    Jan 5 at 11:05

0

You must log in to answer this question.

Browse other questions tagged .