LaTeX.js
LaTeX.js copied to clipboard
\label and \ref do not accept argument with underscore
trafficstars
Get a parsing failure if \ref or \label has an underscore in the argument.
Minimal example (tested on current LaTeX.js Live Playground as well as a local copy of version 0.12.0):
\documentclass{article}
\begin{document}
\section{Introduction}
\label{test_label}
\end{document}
Gives error
ERROR: Parsing failure:
line 5 (column 7): Introduction}\n\\label{test_label}\n\\end{do
-----------------------------------------^
macro \label: group argument expected
Similar error for \ref.
Hmm... very true! It looks like LaTeX is accepting pretty much anything but in LaTeX.js, I am using a normal TeX group. I will have to add a new argument type, like raw or something. I'll think about it.