Skip to content

fix(math): normalize nbsp-bearing converter inputs - #429

Closed
RovshanMuradov wants to merge 2 commits into
kepano:mainfrom
RovshanMuradov:fix/mathml-nbsp-boundary
Closed

RovshanMuradov wants to merge 2 commits into
kepano:mainfrom
RovshanMuradov:fix/mathml-nbsp-boundary

Conversation

@RovshanMuradov

@RovshanMuradov RovshanMuradov commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #427

MathML tokens containing NBSP plus indentation were passed to mathml-to-latex as-is, producing stray spacing in the TeX. Converter input is now serialized through one helper that normalizes ASCII whitespace around NBSP and decodes   /   for the XML converter. Source MathML is not modified.

RovshanMuradov and others added 2 commits October 12, 2026 12:53
Restores the   replacement from kepano#301, which the shared
serializer dropped, so it no longer turns into \&\text{nbsp}; in Markdown.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@RovshanMuradov

Copy link
Copy Markdown
Contributor Author

Closing to keep the review queue small: on six real arXiv HTML papers (~10k formulas) this change makes no difference to the extracted HTML or Markdown. Happy to reopen if a real page needs it.

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.

MathML converter misreads NBSP entities and ASCII indentation

1 participant