[tex-live] fontspec and xcolor incompatibility?

Markus Uhr uhrm at inf.ethz.ch
Tue Sep 21 10:18:22 CEST 2010


Hello all

I upgraded yesterday from TL 2010 pretest to the released version. Since then, text color is not applied any more when the font is selected using the fontspec package and color is specified using commands from the xcolor package.

Example document:

\documentclass{article}
\usepackage{xcolor}
\usepackage{fontspec}
%\usepackage{unicode-math}

% font selection
\setromanfont[Mapping=tex-text]{Cambria}
%\setmathfont{Cambria Math}

%\renewcommand{\color}[1]{\addfontfeature{Color=#1}}

\begin{document}

\large

{\addfontfeature{Color=violet}Test 1. Math: $1+1=2$}

{\color{violet}Test 2. Math: $1+1=2$}

\textcolor{violet}{Test 3. Math: $1+1=2$}

\end{document}


If I set the font color using "\addfontfeature", color is applied, but using "\color" or "\textcolor" has no effect. If I comment out "\setromanfont", color is applied, though.

The renewed color command is a temporary workaround (it doesn't work with math).

Best,
Markus


More information about the tex-live mailing list