Skip to content

Conversation

@dginev
Copy link
Collaborator

@dginev dginev commented Nov 18, 2025

This was encountered in arXiv:2308.06254v1, where a use of \fam was returning a perl 0 scalar value from readRegisterValue.

I think we should harden readRegisterValue to always return an object, catching these cases and defaulting them to what the coercing would do, or Number if nothing else is known.

With the change in the PR the article converts without a Fatal, instead emitting a warning:

Warning:malformed:register_value Register \fam did not return a proper value, got 0

That can also be made into an error if preferred. Encountered in an old issue when processed with the latest latexml worker, at arXiv/html_feedback#22

Diff without whitespace lints at https://github.com/brucemiller/LaTeXML/pull/2693/files?w=1

@dginev dginev requested a review from brucemiller as a code owner November 18, 2025 21:52
@dginev dginev added the arXiv label Nov 18, 2025
@dginev dginev changed the title Robust on raw perl value instead of register type Robust on raw perl value instead of register value Nov 18, 2025
dginev added a commit to arXiv/LaTeXML that referenced this pull request Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant