What package of these two is better for changing math-mode fonts (to .ttf fonts)?

  • 1
    I agree that in its current which one is better form the question is primarily opinion-based, but a question about differences or pros and cons of the packages might not only be interesting, but also useful for a wider audience. Given that the question has already received a useful answer and given that it is very new and that there have been no comments on how to improve the question thus far (or why people voted to close) I voted to keep the question open. – moewe Apr 24 at 8:32
  • I suggest you reword your question to make it more neutral and objectively answerable instead of asking which one is 'better'. – moewe Apr 24 at 8:34

mathfont and mathspec have similar purpose, but mathfont works not only with xelatex but also with lualatex. Both packages allow to change the font of various math symbols and math alphabets.

Both packages have in my view the same deficiency: they care only about the look of the math and not about the mathematical meaning of the symbols.

The difference can be seen in this example:

$\mathrm{a} \preceq a$

The result looks as expected:

enter image description here,

but if you copy and paste then you get: a ? a. Both a are identical, and the symbol is gone.

If you compile with unicode-math:

$\mathrm{a} \preceq a$

then copy & paste will give a ⪯ 𝑎.

  • 3
    It is probably clear from the context, but it might be helpful for future readers to state explicitly that mathspec is for XeLaTeX and that mathfont works on LuaLaTeX and XeLaTeX. unicode-math also works for XeLaTeX and LuaLaTeX. – moewe Apr 24 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.