Skip to content

fix: article citation formatting (double period, spacing, number/pages)#784

Merged
david-christiansen merged 1 commit intoleanprover:mainfrom
kim-em:fix/article-formatting
Mar 5, 2026
Merged

fix: article citation formatting (double period, spacing, number/pages)#784
david-christiansen merged 1 commit intoleanprover:mainfrom
kim-em:fix/article-formatting

Conversation

@kim-em
Copy link
Contributor

@kim-em kim-em commented Mar 3, 2026

Fix three sub-issues in Article citation rendering:

  1. 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.

  2. Missing space between journal name and volume number</em> was immediately followed by <strong> with no space. Now adds an explicit space.

  3. 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:
before

After:
after

MWE: https://github.com/kim-em/verso-citation-mwe

Fixes #781

🤖 Prepared with Claude Code

@kim-em kim-em changed the title fix: Article citation formatting (double period, spacing, number/pages) fix: article citation formatting (double period, spacing, number/pages) Mar 3, 2026
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>
@kim-em kim-em force-pushed the fix/article-formatting branch from 4ce3c06 to 27a4eee Compare March 4, 2026 13:27
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Preview for this PR is ready! 🎉

@david-christiansen david-christiansen added this pull request to the merge queue Mar 5, 2026
Merged via the queue into leanprover:main with commit 82c57c8 Mar 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Article citation: missing spaces, number runs into pp., double period

2 participants