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

MJ4: \mskip\thickmuskip yields typesetting error #3213

Open
AlexEdgcomb opened this issue Apr 2, 2024 · 2 comments
Open

MJ4: \mskip\thickmuskip yields typesetting error #3213

AlexEdgcomb opened this issue Apr 2, 2024 · 2 comments
Labels
Expected Behavior This is how MathJax works

Comments

@AlexEdgcomb
Copy link

Issue Summary

\mskip\thickmuskip yields Missing dimension or its units for \mskip in math mode with MJ4, but shouldn't.

Of note: \; (shorthand for \mskip\thickmuskip) doesn't yield an error.

Steps to Reproduce:

  1. Go to https://codepen.io/alexedgcomb/pen/LYveYBK

Observed: Typesetting error
image

Expected: No typesetting error, like MJ2:
https://codepen.io/alexedgcomb/pen/qBwpByG
image

Technical details:

  • MathJax Version: 4.0.0-beta.4
  • Client OS: MacOS 13.4
  • Browser: Firefox 124.0.1

I am NOT using a MathJax configuration and loading MathJax via:

<script src="https://cdn.jsdelivr.net/npm/mathjax@4.0.0-beta.4/tex-mml-svg.js"></script>

Supporting information:

Issue present in MJ4.0.0-alpha.1: https://codepen.io/alexedgcomb/pen/MWRrWPX

Issue NOT present with \; in beta.4: https://codepen.io/alexedgcomb/pen/yLrpLxK (also not present in alpha.1)

@dpvc
Copy link
Member

dpvc commented Apr 3, 2024

MathJax does not implement dimen registers, count registers, token registers, boxes, or many of the other low-level internals of actual TeX. In particular, the means \thickmuskip and other similar registers, are not implemented. MathJax only processes explicit dimensions for \mskip and other macros that take dimensions.

This was also true in v2. There reason your example "worked" is that v2 had a very simplistic approach to array environment preambles: it completely ignored any characters other than c, l, and r, so your r@{\mskip\thickmuskip}l was reduced to rcl (the 'c' from within the "thick" in \thickmuskip) before being processed. In contrast, v4 implements most of the array preamble options from array.sty, and so actually tries to handle \mskip\thickmuskip, but it looks for an explicit dimension, and can't process \thickmuskip (which is not defined in MathJax in any case).

As you may have guessed, \; is not short for \mskip\thickmuskip in MathJax.

@dpvc dpvc added the Expected Behavior This is how MathJax works label Apr 3, 2024
@AlexEdgcomb
Copy link
Author

Thank you, @dpvc !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expected Behavior This is how MathJax works
Projects
None yet
Development

No branches or pull requests

2 participants