Se compili con pdflatex prova ad utilizzare il pacchetto xcolor invece che color e ricordati di caricare l’opzione fixpdftex.
Quindi:
`\usepackage[fixpdftex]{xcolor}`
Dalla documentazione del pacchetto (par. 2.15.2):
Since pdfTEX does not maintain a color stack — in contrast to dvips — a typical
problem is the behaviour of colors in the case of page breaks, as illustrated by the
following example:`\documentclass{minimal}
\usepackage{xcolor}
\begin{document}
black\color{red}red1\newpage red2\color{black}black
\end{document}`This works as expected with dvips, i.e., ‘red1’ and ‘red2’ being red, however,
with pdftex, ‘red2’ is displayed in black. The problem may be solved by using
the fixpdftex option which simply loads Heiko Oberdiek’s pdfcolmk package.
However, its author also lists some limitations:
• Mark limitations: page breaks in math.
• LaTeX’s output routine is redefinded.
– Changes in the output routine of newer versions of LaTeX are not de-
tected.
– Packages that change the output routine are not supported.
• It does not support several independent text streams like footnotes.
LuCa