TeX - LaTeX Asked by JD80121 on June 18, 2021
I would like to use accents on bold characters in math equations with the Utopia font. It appears that the accent is not properly shifted to the left when using hat{mathbf{x}}
for example. Using mathbf{hat{x}}
does not give good results either.
Here is the MWE:
documentclass{article}
usepackage{fourier-otf}
begin{document}
begin{align*}
X quad hat{X} &qquad x quad hat{x}
mathbf{X} quad hat{mathbf{X}} &qquad mathbf{x} quad hat{mathbf{x}}
mathbf{X} quad mathbf{hat{X}} &qquad mathbf{x} quad mathbf{hat{x}}
end{align*}
end{document}
and the result that I get:
A similar issue was reported here with the STIX2 font. The problem was related to the version of the font used but I don’t know if this could be the issue here. According to tlmgr, the version of the fourier
package is 54090 (2.2).
I can get properly aligned accents if I load fourier
instead of fourier-otf
, but this results in many other issues in my text related to font encoding.
Is there a simple way to make the accents work with bold maths?
You asked,
Is there a simple way to make the accents work with bold maths?
Short answer: Yes. :-)
Slightly longer answer: Replace all instances of mathbf
with symbf
.
Please see sections 3.1, "New Commands", and 4.4, "Legacy 'maths' alphabet commands", of the user guide of the unicode-math
package for more information on the differences between mathbf
and symbf
(as well as mathit
vs. symit
, mathup
vs. symup
, mathrm
vs. symrm
, and mathsf
and symsf
).
documentclass{article}
usepackage{fourier-otf}
begin{document}
begin{align*}
X quad hat{X} &qquad x quad hat{x}
symbf{X} quad hat{symbf{X}} &qquad symbf{x} quad hat{symbf{x}}
symbf{X} quad symbf{hat{X}} &qquad symbf{x} quad symbf{hat{x}}
end{align*}
end{document}
Correct answer by Mico on June 18, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP