Repository navigation
Fix \title, \author and \date with an optional short argument - #142
Closed
Sanjays2402 wants to merge 1 commit into
Closed
Sanjays2402 wants to merge 1 commit into
Sanjays2402 wants to merge 1 commit into
Conversation
\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 "[".
Declare the optional argument in the latexwalker specs ('[{' instead of
'{') and read the mandatory argument at index 1 in the latex2text specs.
Adds a regression test covering \title/\author/\date with a short argument.
Owner
|
Rebased, added important comments and fixes, and merged into main. Closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #114.
\title[short]{full}(and likewise\author/\date) did not declare the optional argument in the latexwalker spec, so the[short]part stayed as plain character nodes and the mandatory argument was never picked up —latex_to_text()returned the rawshort]fulltext and\maketitlerendered a stray[. Declaring the optional argument ('[{') and reading the mandatory one at index 1 in the latex2text specs fixes both the bracketed and plain forms.Regression test added in
test_2_latex2text.py; it fails on master and passes with the fix, and the full suite (342 tests) is green.