Am 03.07.2014 um 17:55 schrieb Chris Chapman <ch...@pentandra.com>: > I am new to ConTeXt (coming from LaTeX), and am really impressed. Great work! > > I am working on a document that has layers that I want to be screen-only, > similar in approach to this: > http://tex.stackexchange.com/questions/167846/implementing-full-page-screen-only-print-only-in-pdf > > I am assuming that Optional Content Groups would be the best way to do this. > How would I set something up like this in ConTeXt/LuaTeX? I know I could make > a screen-only version and a print version of the output pdf, but I want to > have my cake and eat it too ;)
You can test if the layers are hidden when you print the following example, I tried the Adobe Reader on my Mac and they where still visible. \setupinteraction[state=start] \defineoverlay[PageBackground] [\startMPcode fill fullsquare xyscaled(OverlayWidth,OverlayHeight) withcolor \MPcolor{orange} ; \stopMPcode] \defineoverlay[FrameBackground][\startMPcode fill fullsquare xyscaled(OverlayWidth,OverlayHeight) withcolor \MPcolor{green} ; \stopMPcode] %\setupbackgrounds[page][background=color,backgroundcolor=orange] % doesn’t work because you can only hide the background together with the text \setupbackgrounds[page][background=PageBackground] \setupviewerlayer[printable=no] \defineviewerlayer[mylayer] %\showlayoutcomponents % use this to enable/disable certain text areas \starttext \input knuth \startviewerlayer[mylayer] \input ward \stopviewerlayer \input tufte \startframedtext[width=max,background=FrameBackground] \input weisman \stopframedtext \stoptext Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________