It seems that the automatic tag-inferred syntax-highlighting doesn't work for latex code when adding the latex tag on stackoverflow.
As one can see the code block syntax is not highlighted, even with added tag. Adding <!-- language: lang-latex -->
before the code block enables correctly the highlighting, so the functionality is there.
However, repeating the same example with Python code and the python
tag enables the syntax highlighting already without the <!-- ... -->
HTML tag. So there seems be something odd in inferring the syntax from the latex
tag.