TransWikia.com

Bold greek letters with fontspec

TeX - LaTeX Asked on October 8, 2020

I am using bold notation for vectors but for some reason I can’t display it when I use greek letters:

documentclass[a4paper,12pt]{article}
usepackage[no-math]{fontspec}
setmainfont{TeX Gyre Termes}
usepackage{unicode-math}
setmathfont{TeX Gyre Termes Math}
usepackage[cal = txupr]{mathalpha}
begin{document}
begin{align}
mathbf{C}&equivleft(a,b,cright)
mathbf{X_{i}}&equivleft(x_{i},y_{i},z_{i}right)
mathbf{Delta_{i}}&equiv mathbf{C}-mathbf{X_{i}}
end{align}
end{document}

mathbf{C} and mathbf{X_{i}} work, but mathbf{Delta_{i}} doesn’t. Why is that?

One Answer

Use symbfit{gamma}, etc. Better yet, define something like

newcommandvectorsym[1]{symbfit{#1}

This way, if you ever need to change the formatting of vector symbols, again, you can update it in one place, instead of trying to hunt down every vector in all your documents.

An alternative is to load unicode-math with the option mathbf=sym, if you only ever use mathbf for things like vector symbols.

The reason for this is that mathbf is for bolded words in math mode, and therefore uses the text font. The default bold text font does not contain Greek letters. If you loaded a Unicode font that supports Greek, with either setmainfont or setmathrm, you would then be able to write Greek words such as alpha mathbf{ και } beta. (Although something like textnormal{bfseries ...} also works and might be less ambiguous.)

Correct answer by Davislor on October 8, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP