In another answer (for a completely different question) I have been advised to use the \sym...
-commands to change the font in math mode instead of the traditional \math...
-font commands, if I use LuaLaTeX and unicode-math.
Question 1: Why? I tried to read the fontspec documentation but did not get the point. Especially, I wonder when should I use the one or the other alternative? I believe there are probably valid use cases for the traditional \math...
-font commands. Otherwise, those commands could have been redefined to be equivalent to the new \sym...
-commands.
I use Libertinus for my project and redefine some fonts, because I do not like the default selection which are made by the Libertinus package. However, I made some strange observations.
The MWE with nothing else than the pure Libertinus package:
\documentclass[a4paper]{article}
\usepackage{libertinus}
\begin{document}
\begin{tabular}{lcc}\hline
& \verb#\math...# & \verb#\sym...# \\\hline
\verb#...frak# & $\mathfrak{F}$ & $\symfrak{F}$ \\
\verb#...cal# & $\mathcal{C}$ & $\symcal{C}$ \\
\verb#...tt# & $\mathtt{Teletype}$ & $\symtt{Teletype}$ \\\hline
\end{tabular}
\end{document}
Question 2: Both fraktur commands (\mathfrak
, \symfrak
) do not seem to change the font at all. Why? What is wrong?
Question 3: The fraktur and calligraphic fonts do no seem to differ between the \math...
-variant and the \sym...
-variant. This is somehow expected. But the oldstyle \mathtt
does not seem to select a teletype font. Maybe it is mono-spaced (it is hard to tell), but it still has serifs. Why? Also it obviously differs from the \symtt
-font, which I would call a real teletype font. Why do \mathtt
and \symtt
differ?
I tried to select a different fraktur, calligraphic and teletype font. See this MWE:
\documentclass[a4paper]{article}
\usepackage{libertinus}
\setmonofont{Inconsolatazi4-Regular.otf}[Scale=MatchLowercase]
\setmathtt{Inconsolatazi4-Regular.otf}[Scale=MatchLowercase]
\usepackage[cal=pxtx,frak=pxtx]{mathalfa}
\begin{document}
\begin{tabular}{lcc}\hline
& \verb#\math...# & \verb#\sym...# \\\hline
\verb#...frak# & $\mathfrak{F}$ & $\symfrak{F}$ \\
\verb#...cal# & $\mathcal{C}$ & $\symcal{C}$ \\
\verb#...tt# & $\mathtt{Teletype}$ & $\symtt{Teletype}$ \\\hline
\end{tabular}
\end{document}
The fonts are as I want them, but only if I use the old-fashioned \math...
-commands. Also, the fraktur font is a real fraktur font. But obviously, the \setmathtt
-command from the fontspec package and the mathaplpha package only affect the traditional commands for font selection in math mode.
Question 4: If I am supposed to use the new \sym...
-commands (for whatever reason), how to I change the font of the \sym...
-commands according to my needs?
\sym...
do not change the font, they shift the unicode range to select the different styles from the same font Unicode math fonts have styles such as fraktur and bold italic up in the U+1Dxxx range.\setmonofont
etc.) cannot change the visual appearance of the\sym...
-commands, because they still use the same font but glyphs from a different range. This is by intended design. If I wish to use a different font for fraktur, I must resort to the\math...
-commands. This is not ideal, but the only option.