You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 030b8f3
Browse filesBrowse the repository at this point in the historyBrowse files
Fix \title, \author and \date with an optional short argument
\title[short]{full} (and the same for \author and \date) was parsed with
the optional argument missing from the macro spec, so the leading "[" and
the short text were left as ordinary character nodes and the mandatory
argument was never recognised. latex_to_text() then emitted the raw
"short]full" text, and \maketitle rendered a stray "[".
The optional argument is not a LaTeX kernel feature: the standard classes
(article, report, book) declare these three commands with a single
mandatory argument. Several widely used classes do add a leading optional
argument holding a short form of the field, meant for running heads --
beamer for all three commands, and the AMS classes (amsart, amsbook,
amsproc, and acmart, which is built on amsart) for \title and \author.
Since documents using the standard classes simply never have the optional
argument present, declaring it costs them nothing.
Declare it in the latexwalker specs ('[{' instead of '{'), and have the
latex2text specs read the *last* argument rather than a fixed position, so
that they also keep working with a latex context in which these macros
were declared with the mandatory argument alone.
Adds regression tests at the latexwalker level, for the rendered title
block with the short form, and for a context declaring the mandatory
argument alone.
Closes#114.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NbTg7TMbpkWihLzotNLPdu
0 commit comments