Normalize duplicated arXiv LaTeX metadata#17
Open
hqhq1025 wants to merge 1 commit into
Open
Conversation
40e51c9 to
84d893d
Compare
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.
Summary
Fixes arXiv metadata formatting issues caused by mixed text/MathJax extraction and raw TeX display.
This is broader than a single paper title: it normalizes duplicated LaTeX/math fragments at seed time and startup, and routes all user-facing arXiv title/abstract/comment/journal-ref displays through a shared formatter.
Examples handled:
\gtrsim 100\times\gtrsim 100\times->≥ 100×for display, and a single cleaned TeX fragment in stored metadata.z=1.37z=1.37->z=1.37for display, and$z=1.37$in stored metadata.\mathbb{P}^1\mathbb{P}^1->P^1for display.\mathcal{N}=1\mathcal{N}=1->N=1for display.GL(d_1)\times GL(d_2)GL(d_1)\times GL(d_2)-> oneGL(d_1)× GL(d_2)display fragment.\url{...}and\href{...}{...}no longer appear in displayed metadata.Affected display surfaces now use display fields:
BibTeX/export download paths keep the cleaned raw metadata instead of the display-formatted text.
Adds:
sites/arxiv/metadata_cleaning.pyscripts/check_arxiv_metadata_latex.pyVerification
python3 scripts/check_arxiv_metadata_latex.pypython3 -m py_compile sites/arxiv/app.py sites/arxiv/metadata_cleaning.py scripts/check_arxiv_metadata_latex.py/abs/2604.07983/search?query=2025mkn&searchtype=all/list/astro-ph.CO/recent/category/astro-ph/author/Lemon,%20Cameron\gtrsim 100\times\gtrsim 100\times, adjacent duplicated math blocks,z=1.37z=1.37,\url{...}, or\href{...}{...}.Fixes #16.