I've added the following packages:
\usepackage{fontspec}
\usepackage{xunicode,xltxtra,url,parskip}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{hyperref}
\definecolor{linkcolour}{rgb}{0,0.2,0.6}
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour}
In addition, I started compiling(?) in XeLaTeX instead of pdfLaTeX.
As a consequence, in the math environment, the boldface (i.e. \mathbf
) in combination with Greek letters does not work (whereas the latin letter do work). Just to clarify: I can still compile my code, but the Greek letter have become invisible in the output.
I've tried to use the \bm
package to attempt to circumvent this problem, but it spits out the following error:
! Undefined control sequence.
\Call@AtVeryEndDocument ...cumentHook \@undefined
\global \let \Call@AtVeryE...
Does anybody know how to fix this problem?
Best Answer
When you load
fontspec
also the font for math upright letters is changed to use the default text font. The Greek letters in this font are not where LaTeX expects them to be: with the standard definition,\Phi
points to slot0x08
, while the uppercase Phi in Unicode is atU+03A6
.The command
\mathbf
, in standard LaTeX, only works with Latin letters and uppercase Greek. You can revert to the standard behavior by loadingthat will use the standard Computer Modern font for upright math characters. But there's no point in not doing the big step and load
but you need
\symbf
rather than\mathbf
(also for Latin letters).See the following example:
that produces
If you don't want to do the big step, you still can get
\mathbf
to work with uppercase Greek; just teach XeLaTeX where to go and find the uppercase Greek letters.Although you can find somewhere that
xunicode
andxltxtra
are recommended with XeLaTeX, the information is outdated and they should not be loaded. Onlyxltxtra
can, in the unusual situation that you really need the features it provides.