\selectcolormodel{gray}
doesn't work for the duck hair, but it works for the other parts of the ducks, why?
\documentclass{ltugboat}
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{ifthen}
\newboolean{grayscale}
\setboolean{grayscale}{true}% for the black & white version
%\setboolean{grayscale}{false}% for the colored version
\usepackage{tikzducks}
\usetikzlibrary{positioning}
\newenvironment{mytikz}{%
\begin{tikzpicture}
\ifthenelse{\boolean{grayscale}}{\selectcolormodel{gray}}{}
}
{\end{tikzpicture}}
\usepackage{ifpdf}
\ifpdf
\usepackage[breaklinks,hidelinks]{hyperref}
\else \usepackage{url} \fi
\begin{document}
Why \textbackslash\texttt{selectcolormodel\string{gray\string}} does not work for the duck hair?
Black and white version:
\begin{mytikz}
\begin{scope}[xscale=-1]
\duck[longhair=pink]
\end{scope}
\begin{scope}[xshift=10pt]
\duck[crazyhair=orange]
\end{scope}
\end{mytikz}
Colored version:
\setboolean{grayscale}{false}
\begin{mytikz}
\begin{scope}[xscale=-1]
\duck[longhair=pink]
\end{scope}
\begin{scope}[xshift=10pt]
\duck[crazyhair=orange]
\end{scope}
\end{mytikz}
\end{document}
\selectcolormodel
. Switching togray
as package option (xcolor
) works. Have you tried different positioning of the switching command? – TeXnician Aug 7 '17 at 7:20\begin{document}
? I'm going to work now, I'll try tonight and let you know. – CarLaTeX Aug 7 '17 at 7:30tikzducks
tag :) – user36296 Aug 7 '17 at 11:35tikzducks
tag is mandatory! Yes, Ulrike said more or less the same thing in her answer. <3 – CarLaTeX Aug 7 '17 at 11:44