# LuaLaTeX and mathspec

It seems that, if I want to use the letters and digits from a system font that is not especially designed for mathematics in math mode as well, I need mathspec and XeLaTeX; and cannot replace XeLaTeX with LuaLaTeX (with which mathspec is incompatible). Is that right?

• what do you mean by "for mathematics"?, most fonts (even unicode fonts) don't have the symbols and tables required for math layout, however you can use the main text font as the the font for letters in math, just as \mathrm and \mathit use text fonts in the classical tex setup – David Carlisle Feb 1 '16 at 13:32
• @DavidCarlisle, edited. – Toothrot Feb 1 '16 at 14:02
• It is already 2020 and lualatex still isn't compatible with this package. – 71GA Mar 4 '20 at 12:29

Yes. If you want to use mathspec, then at present you need to run XeLaTeX. (The mathspec package pre-dates wide availability of LuaTeX.)
There are few technical reasons for this, but mathspec does use one primitive that would need to be emulated in LuaTeX before it could fully supported:
• \XeTeXglyphbounds — this is used in the \" and " definitions to provide better kerning between "faked" maths symbols.
Besides this, the main features of the package could be fairly easy translated into LuaTeX-compatible code, however. Unfortunately the developer of mathspec no longer has the time to work on the code.
I believe the mathastext package performs a similar role as mathspec but is compatible with both XeTeX and LuaTeX. I haven't done a direct comparison of their feature sets, however.