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.


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.




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


%switch figure command
%param width
%param height
%param name of the image
%param image caption
 {%if: (cloured) image
    \centering\includegraphics[width=#1, height=#2]{#3}%
 {% else: framed box

 \switchFigure{150pt}{150pt}{tiger}{1st caption}
 \switchFigure{150pt}{150pt}{tiger}{2nd caption}

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

  • Nice one! Now, I think on draft mode \includegraphics already replaces the image with a corresponding box of the same size. Maybe looking at its code one could figure out how to put there an empty box instead? This will be better as it won't force you to always supply the width and height of the image. – Juan A. Navarro May 15 '13 at 9:11
  • 1
    Good idea. Unfortunately the demo option of the graphicx package print a 150pt x 100pt black rectangle. You will need to redefine it like discussed here tex.stackexchange.com/questions/44195/… and here tex.stackexchange.com/questions/30622/…. – susis strolch May 15 '13 at 9:32

I had to do a similar thing some years ago, and (ahem) somewhat over-engineered it.

You might want to take a look at my supplements package, which is intended to allow single- or multi-page sections within a document to be LaTeXed separately, while keeping counters, references, and so on, synchronised.

The idea is that if a sequence of pages have to be LaTeXed in a particular way – perhaps they have odd margins, or weird fonts, or have to have some PDF post-processing – then rather than fight with LaTeX to contain those changes to one part of the document, this lets you prepare those supplementary pages in a completely separate process, but with the page numbers (and so on) in the master file skipping the right number, so that the supplementary pages can be inserted at collation time.

This was a while ago (the package documentation reports that it should be portable to LaTeX2e!), but I expect it will still work. I've never had the motivation to update it, but if you do try this, and it works (or doesn't) please do let me know, and that might be the prompt for me to tidy this up and put it on CTAN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.