Is there the possibility with LaTeX of having some element that change if it is printed with colours or in black and white?

I was thinking about the rectangles around links with hyperref that are visible on the screen but do not appear when the document is printed. I need something similar but that behaves in different ways if is printed in BW or in colours.

The final goal would be to have an image made with tikz or/and pgfplots with some filling or patterns; when the image is visualized on the screen or is printed with colours I would like to have filling, when instead is printed in BW I would like to have black patterns. This is because the filling with different colours when printed in BW looks very similar and a solution is to use instead different patterns.

  • 2
    I am aware of the possibility to generate two PDFs from the same source using some more-or-less convenient style changes. Does a list of affected style options and/or best-practices regarding dual pdfs help you? I am also aware that such an answer is not quite what you asked for. – Christian Feuersänger Jun 28 '13 at 18:30
  • @ChristianFeuersänger I don't know if it helps. But if you can give me some reference to this list I'll take a look, thanks – Red Jun 29 '13 at 10:00
  • Well, there is no such list available (to my knowledge): the options are scattered throughout a couple of manuals. I suppose one would immediately find them as soon as one tries to convert a colored document to a gray scale one. I two pdfs would be acceptable to you, you can edit and rephrase your question such that I (or others) know what to answer. – Christian Feuersänger Jun 29 '13 at 14:54
  • @ChristianFeuersänger I think this can help but it is not the full answer to my question, so maybe I can start another question focused on your suggestion – Red Jul 4 '13 at 11:26

The classic way to do this sort of thing is to use a colour palette where specific colours have either the same, or different greyscale representations. One can coerce this by drawing up the patterned fill, then setting each element of the fill to have the same RGB value, but w/ a different colour profile attached so as to re-create the fill pattern. When viewed in colour, one sees the unconverted RGB, when converted to greyscale the colour profile is applied and one gets the desired change.

| improve this answer | |
  • 4
    Yes but how to do it? – percusse Jul 3 '13 at 11:52
  • I didn't understand if your solution is for having a filled region for colour printing and a patterned one for BW printing or if it is for having a colour or grey filled region for printing in colour or in BW respectively. My question regards the first option but also the second one would be interesting if you can tell me how to do it. – Red Jul 3 '13 at 12:08

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.