While using the syntax package together with microtype, I stumbled on a strange error:
Missing font identifier.<to be read again>\chardef <TEST> ::= `
Missing number, treated as zero.<to be read again>\chardef <TEST> ::= `
With the following minimal example, I was able to reproduce the error:
\documentclass{article}
\usepackage{syntax}
\usepackage{microtype}
\begin{document}
\begin{grammar}
<TEST> ::= `test'
\end{grammar}
\end{document}
When I remove microtype, this works fine. By coincidence, I also found a hack that seems to solve the problem by adding a \lit*{}
command before the grammar definition, e.g.
\documentclass{article}
\usepackage{syntax}
\usepackage{microtype}
\begin{document}
\lit*{}
\begin{grammar}
<TEST> ::= `test'
\end{grammar}
\end{document}
Is there a way to resolve this error cleanly? What is causing it?