fix: article citation formatting (double period, spacing, number/pages)#784
Merged
david-christiansen merged 1 commit intoleanprover:mainfrom Mar 5, 2026
Merged
Conversation
Fix three sub-issues in Article citation rendering: 1. Double period after journal names ending in "." (e.g. "Lang..") 2. Missing space between journal name and volume number 3. Number running directly into "pp." with no separator The fix conditionally appends "." after journal names, puts the number in parentheses, and adds ", pp." before page ranges with a non-breaking space. Applied to both HTML and TeX backends. Fixes leanprover#781 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4ce3c06 to
27a4eee
Compare
Contributor
|
Preview for this PR is ready! 🎉 |
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.
Fix three sub-issues in Article citation rendering:
Double period after journal names ending in "." — e.g. "Proc. ACM Program. Lang." was rendered as "Lang.." because the template unconditionally appended a period. Now checks if the journal name already ends with a period using
slugString.Missing space between journal name and volume number —
</em>was immediately followed by<strong>with no space. Now adds an explicit space.Number runs directly into "pp." with no separator — "ICFPpp. 100–150" is now rendered as "(ICFP), pp. 100–150" with the number in parentheses and a comma before page ranges.
Applied to both HTML and TeX backends.
Before:

After:

MWE: https://github.com/kim-em/verso-citation-mwe
Fixes #781
🤖 Prepared with Claude Code