From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Support for Optional Content Groups
Date: Thu, 3 Jul 2014 18:33:42 +0200 [thread overview]
Message-ID: <FF7E216E-CBCB-4D4D-A709-0ED253F165C0@gmail.com> (raw)
In-Reply-To: <1111725488.140309.1404402933094.JavaMail.zimbra@pentandra.com>
Am 03.07.2014 um 17:55 schrieb Chris Chapman <chris@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
___________________________________________________________________________________
next prev parent reply other threads:[~2014-07-03 16:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <947663393.140271.1404401839314.JavaMail.zimbra@pentandra.com>
2014-07-03 15:55 ` Chris Chapman
2014-07-03 16:33 ` Wolfgang Schuster [this message]
2014-07-03 17:54 ` Hans Hagen
2014-07-03 18:08 ` Chris Chapman
2016-05-22 9:22 ` Meer, Hans van der
2016-05-22 9:36 ` Framing multiline equations L.S.-Soc&Gam
2016-05-22 15:56 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FF7E216E-CBCB-4D4D-A709-0ED253F165C0@gmail.com \
--to=schuster.wolfgang@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).