Produce a monochrome (pure black and white) pdf using xelatex
Note this is fixed in current releases of the xetex.def graphics driver so the patch here is not needed
The monochrome
option (inherited from the standard color
package, not needing xcolor
) is supposed to work, as in the other answer, but xetex.def
currently breaks that option, we should fix that.
this works
\listfiles % <================ to get list of used packages and versions
\documentclass{article}
\usepackage[monochrome]{xcolor} % <=====================================
\makeatletter
\let\check@for@XeTeX@colorstack\relax
\makeatletter
\definecolor{orange}{RGB}{255,127,0}
\begin{document}
\textcolor{orange}{Hello!}
\end{document}
but make sure to remove the redefinition when you do want colour.
Just add for example option [monochrome]
to xcolor
.
See the following MWE (see marked line with <==============
):
\listfiles % <================ to get list of used packages and versions
\documentclass{article}
\usepackage[monochrome]{xcolor} % <=====================================
\definecolor{orange}{RGB}{255,127,0}
\begin{document}
\textcolor{orange}{Hello!}
\end{document}
and the resulting pdf:
and my list of used packages including version numbers:
*File List*
article.cls 2014/09/29 v1.4h Standard LaTeX document class
size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
xcolor.sty 2016/05/11 v2.12 LaTeX color extensions (UK)
color.cfg 2016/01/02 v1.6 sample color configuration
pdftex.def 2016/07/10 v0.06j Graphics/color for pdfTeX
infwarerr.sty 2016/05/16 v1.4 Providing info/warning/error messages (HO)
ltxcmds.sty 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
supp-pdf.mkii
***********
)