Skip to content

IMP-14b: also strip orphan cite keys from paper_final.md#287

Open
youwangd wants to merge 1 commit into
aiming-lab:mainfrom
youwangd:fix/scrub-orphan-cites-from-paper-final-md
Open

IMP-14b: also strip orphan cite keys from paper_final.md#287
youwangd wants to merge 1 commit into
aiming-lab:mainfrom
youwangd:fix/scrub-orphan-cites-from-paper-final-md

Conversation

@youwangd

@youwangd youwangd commented Jun 1, 2026

Copy link
Copy Markdown

Stage 22 currently strips orphan \cite{...} keys from paper.tex when they have no matching @entry in references.bib (IMP-14), but paper_final.md is left unrepaired. Users who consume the markdown deliverable see citations to keys that do not resolve.

This change mirrors the IMP-14 stripping for the markdown variant. The .md uses [key1, key2] markdown-style citations rather than \cite{...}, so we conservatively only touch brackets whose entire content matches a comma-separated list of cite-key-shaped tokens (lowercase-author + 4-digit-year + lowercase suffix). Markdown links like text and other brackets are left untouched.

Adds 5 tests in TestIMP14b_StripOrphanedCitesFromMarkdown covering: mixed keys, all-missing, link preservation, real-world paper pattern, and no-op cases. Existing IMP-14 .tex tests untouched.

Stage 22 currently strips orphan \cite{...} keys from paper.tex
when they have no matching @entry in references.bib (IMP-14), but
paper_final.md is left unrepaired. Users who consume the markdown
deliverable see citations to keys that do not resolve.

This change mirrors the IMP-14 stripping for the markdown variant.
The .md uses [key1, key2] markdown-style citations rather than
\cite{...}, so we conservatively only touch brackets whose entire
content matches a comma-separated list of cite-key-shaped tokens
(lowercase-author + 4-digit-year + lowercase suffix). Markdown
links like [text](url) and other brackets are left untouched.

Adds 5 tests in TestIMP14b_StripOrphanedCitesFromMarkdown covering:
mixed keys, all-missing, link preservation, real-world paper
pattern, and no-op cases. Existing IMP-14 .tex tests untouched.
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.

1 participant