[Tex/LaTex] How to divide document for black and color printing

colorpdftexprinting

Most of my document is black text, but there is a color figure here and there. I would like to print the text on a black and white printer, and the figures on a color printer. I know i could just select the pages with figures and print them whole on the color printer, but then the text would look different.

Is there a way (in PDF Latex) to generate two separate versions of the document, one with only the text, but with space left for the figures, and the other with the figures only, but in their proper positions, so that i can print the two versions on top of one another? I'm willing to manually mark the parts i want to separate.

Best Answer

What about simply set the text in white colour for the coloured version and for the text version in black but with a wildcard of the same size as the image?

Maybe it's not elegant, but seems to work.

%http://mirrors.ctan.org/info/examples/lgc2/pstricks/tiger.eps

\documentclass{article}

\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{blindtext}
\usepackage{caption}

\usepackage{etoolbox}
% it is initially set to `false' and can be set by issuing
% \booltrue{coloured} or \boolfalse{coloured}
\newbool{coloured}
%comment for text version; comment out for coloured version
\booltrue{coloured}

 \ifbool{coloured}
    {\color{white}}
    {\color{black}}

%switch figure command
%param width
%param height
%param name of the image
%param image caption
\newcommand{\switchFigure}[4]{
\ifbool{coloured}
 {%if: (cloured) image
   \begin{figure}[htb]%
    \centering\includegraphics[width=#1, height=#2]{#3}%
   \caption{#4}%
   \end{figure}%
 }
 {% else: framed box
    \begin{figure}[htb]%
    \centering\parbox[t][#1][c]{#2}{}%
   \caption{#4}%
   \end{figure}%
 }
}

\begin{document}
 \blindtext
 \switchFigure{150pt}{150pt}{tiger}{1st caption}
 \blindtext[2]
 \switchFigure{150pt}{150pt}{tiger}{2nd caption}
 \blindtext
\end{document}

To switch between the version comment / comment out the boolean flag.