LaTeXML
LaTeXML copied to clipboard
expansion of \title argument may happen too early
trafficstars
Discovered while trying to compile the LaTeX News https://www.latex-project.org/news/latex2e-news/: the argument of \title is expanded immediately, but it contains a macro that is only defined later, and so it fails.
MWE:
\documentclass{article}
\title{\mytitle}
\newcommand{\mytitle}{Title}
\begin{document}
\maketitle
\end{document}
causes
Error:undefined:\mytitle The token T_CS[\mytitle] is not defined. at String; line 2 col 0
We may want to bundle the fix here with a fix for ar5iv#174 which has a sibling issue in how we handle \title currently.
We had a follow-up discussion in PR #1937 which somewhat firmly established we will defer a proper fix for this issue till 0.8.8, refocusing the frontmatter implementation around the original LaTeX internals (such as \@author, \@title, \@date).