Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--noinvisibletimes: choose zero-width space over invisible times #2303

Merged
merged 2 commits into from
Jan 28, 2024

Conversation

dginev
Copy link
Collaborator

@dginev dginev commented Jan 24, 2024

Fixes #1941 . At least it allows it to be fixed, via a new option.

Here is a draft following some offline discussions on allowing a customization switch for preferring zero-width space (U+200B) over invisible times (U+2062) in implied <mo> elements.

The PR minimally touches up the character in post-processing, via the MathML::stylizeContent sub.

An easy test is:

$ latexmlc 'literal:2x' --whatsin=math --dest=test.html \
  --noinvisibletimes

I have exposed the option in latexmlpost and latexmlc. But not yet in latexmlmath (maybe later).

@dginev dginev requested a review from brucemiller January 24, 2024 19:41
@brucemiller
Copy link
Owner

I think I tend to prefer one of the variants we discussed, like --noinvisibletimes, for example. There isn't really a good solution, but there is clearly at least a temporary need.

So why don't you take a fresh look, change the option name if you want to, and then go ahead & merge it whichever way you feel good about :>

@dginev dginev changed the title --mathstylize option: zero-width space over invisible times --noinvisibletimes: choose zero-width space over invisible times Jan 28, 2024
@dginev dginev force-pushed the mathstylize-option branch from 2327bf8 to 95df61a Compare January 28, 2024 15:43
@dginev
Copy link
Collaborator Author

dginev commented Jan 28, 2024

--noinvisibletimes works, thanks!

@dginev dginev merged commit 2f82c5f into brucemiller:master Jan 28, 2024
13 checks passed
@dginev dginev deleted the mathstylize-option branch January 28, 2024 15:58
@dginev dginev mentioned this pull request Feb 23, 2024
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.

do not emit invisible times before and after text
2 participants