unicode-math
unicode-math copied to clipboard
Greek letters not printed in text mode
Description
When in text or math text mode (\mathrm, \mathit, \mathbf) I access Greek letters via the respective latex commands (e.g. \gamma, \Gamma) no character is printed. Using Unicode Greek letters, however, everything is ok.
Check/indicate
- [x] Relevant for XeTeX
- [ ] Relevant for LuaTeX
- [ ] Issue tracker has been searched for similar issues?
- [ ] Links to <tex.stackexchange.com> discussion if appropriate
Minimal example demonstrating the issue
\documentclass{article}
\usepackage[math-style=french,bold-style=upright]{unicode-math}
\setmainfont{EBGaramond12-Regular.otf}[ % https://github.com/georgd/EB-Garamond
Path=fonts/EBGaramond/,
Ligatures={TeX,Discretionary},
UprightFeatures={
SizeFeatures={
{Size=-8, Font={EBGaramond08-Regular.otf}},
{Size= 8-, Font={EBGaramond12-Regular.otf}}
}
},
ItalicFont={EBGaramond12-Italic.otf},
ItalicFeatures={
SizeFeatures={
{Size=-8, Font={EBGaramond08-Italic.otf}},
{Size= 8-, Font={EBGaramond12-Italic.otf}}
}
},
Mapping=tex-text,
Numbers={OldStyle},
AutoFakeBold=1.5
]
\setmathfont{Garamond-math.otf}[ % https://github.com/YuanshengZhao/Garamond-Math
Path=fonts/Garamond-Math/,
StylisticSet={1,4} % Garamond based blackboard, Semibold variant
]
\begin{document}
\begin{tabular}{lr}
text & \noindent{γθξ ABCabc123\textsubscript{123}}\\
bfseries & {\bfseries γθξ ABCabc123\textsubscript{123}}\\
itshape & {\itshape γθξ ABCabc123\textsubscript{123}}\\
math* & $γθξ ABCabc123^{123}$\\
mathrm & $\mathrm{γθξ ABCabc123^{123}}$\\
symrm & $\symrm{γθξ ABCabc123^{123}}$\\
mathit & $\mathit{γθξ ABCabc123^{123}}$\\
symit & $\symit{γθξ ABCabc123^{123}}$\\
mathbf & $\mathbf{γθξ ABCabc123^{123}}$\\
symbf & $\symbf{γθξ ABCabc123^{123}}$\\
mathbfit & $\mathbfit{γθξ ABCabc123^{123}}$\\
symbfit & $\symbfit{γθξ ABCabc123^{123}}$\\
mathbb & $\mathbb{γθξ ABCabc123^{123}}$\\
symbb & $\symbb{γθξ ABCabc123^{123}}$\\
\hline
text & \noindent{\gamma\theta\xi ABCabc123\textsubscript{123}}\\
bfseries & {\bfseries \gamma\theta\xi ABCabc123\textsubscript{123}}\\
itshape & {\itshape \gamma\theta\xi ABCabc123\textsubscript{123}}\\
math* & $\gamma\theta\xi ABCabc123^{123}$\\
mathrm &$\mathrm{\gamma\theta\xi ABCabc123^{123}}$\\
symrm & $\symrm{\gamma\theta\xi ABCabc123^{123}}$\\
mathit &$\mathit{\gamma\theta\xi ABCabc123^{123}}$\\
symit & $\symit{\gamma\theta\xi ABCabc123^{123}}$\\
mathbf &$\mathbf{\gamma\theta\xi ABCabc123^{123}}$\\
symbf & $\symbf{\gamma\theta\xi ABCabc123^{123}}$\\
mathbfit& $\mathbfit{\gamma\theta\xi ABCabc123^{123}}$\\
symbfit & $\symbfit{\gamma\theta\xi ABCabc123^{123}}$\\
mathbb &$\mathbb{\gamma\theta\xi ABCabc123^{123}}$\\
symbb & $\symbb{\gamma\theta\xi ABCabc123^{123}}$\\
\end{tabular}
\end{document}
Further details
This appears to be a commonly confused point. \gamma
"points to" a mathematical gamma symbol, so if the text font in \mathbf (or whatever) doesn't have mathematical letters it won't show anything.
It's not entirely out of the question that \gamma
could point to a text gamma if inside \mathbf
and a math gamma if not...
Comments from others?
I was going to reply similarly but I suspect it is easier to make it work than document why it's reasonable that it doesn't work.
\gamma points, via the mathcode, to whatever whatever unicode slot matches the current \symbxx alphabet so I suppose it's not unreasonable that for \mathxx it points to its natural unicode slot.
On 13 June 2018 at 14:30, Will Robertson [email protected] wrote:
This appears to be a commonly confused point.
\gamma
"points to" a mathematical gamma symbol, so if the text font in \mathbf (or whatever) doesn't have mathematical letters it won't show anything.It's not entirely out of the question that
\gamma
could point to a text gamma if inside\mathbf
and a math gamma if not...Comments from others?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wspr/unicode-math/issues/472#issuecomment-396937690, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNcAqoUvcbb5h7mYNqBCtcg7rLHjC2yks5t8RP4gaJpZM4UmE7Q .