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 Feb 1, 2016 at 13:32
  • @DavidCarlisle, edited.
    – Toothrot
    Feb 1, 2016 at 14:02
  • 2
    It is already 2020 and lualatex still isn't compatible with this package.
    – 71GA
    Mar 4, 2020 at 12:29

1 Answer 1


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .