Unit \mu

31 views
Skip to first unread message

Dirk Hünniger

unread,
Apr 6, 2024, 8:35:51 AMApr 6
to MathJax Users
Hello,

I am working on a MediaWiki to LaTeX converter (mediawiki2latex). I take the formulas in the Wikipedia articles and copy and paste them in a LaTeX document. This worked quite perfectly. But now I encountered a problem. The unit \mu is allowed in MathJax but not in LaTeX. See here


In the Wiki the Formula looks perfectly Ok. But when copy pasting it into a LaTeX document. LaTeX fails with an error.

I am happy for all suggestions on how to resolve the issue. My first thought would be to convert the unit for \mu to \em in the formula using some kind of magic in MathJax and paste the resulting formula in LaTeX. The only problem is that I don't if or how MathJax can to this.

Yours Dirk

Davide Cervone

unread,
Apr 7, 2024, 7:34:47 PMApr 7
to mathja...@googlegroups.com
The "mu" unit in TeX means "math units" and is relative to the size of the mathematics (text size, script size, or script script size), and is intended mostly for use in macro definitions that could appear in any of those sizes.  It is only allowed in math mode, but apparently the dimension for \\[dimen] is handled in text mode in actual LaTeX, while MathJax doesn't make that distinction here.  There is really no reason to use mu units in the example you give, as it will never be in any other size, so no need to use a size-relative unit.  But I'm sure you have found that the quality of the LaTeX in expressions in Wikipedia varies greatly.

The mu unit is 18 mu to 1 em in the given size.  So you can use that formula to make the conversion to ems.  Because MathJax takes TeX/LaTeX as input, but doesn't produce it as output, there is no straight-forward means of having MathJax make this change for you.

Note that there are a number of non-standard macros in MathJax, and some macros that are less strict in MathJax than in actual TeX, so you will undoubtedly come across other expressions that display in MathJax, but not in actual LaTeX.

Davide


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/b06e24ce-c9bd-444b-a24d-3e8a36425579n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages