Re: [NTG-context] Support for Optional Content Groups

2016-05-22 Thread Meer, Hans van der

> On 03 Jul 2014, at 19:54, Hans Hagen  wrote:
> 
> I tried this in acrobat:
> 
> \defineviewerlayer[visibleandprint]  [printable=yes,state=start]
> \defineviewerlayer[visibleandnotprint]   [printable=no, state=start]
> \defineviewerlayer[notvisibleandprint]   [printable=yes,state=stop]
> \defineviewerlayer[notvisibleandnotprint][printable=no, state=stop]
> 
> \setupinteraction[state=start]
> 
> \starttext
> 
> \startviewerlayer[visibleandprint]   visible and print \stopviewerlayer 
> \blank
> \startviewerlayer[visibleandnotprint]visible and not print 
> \stopviewerlayer \blank
> \startviewerlayer[notvisibleandprint]not visible and print 
> \stopviewerlayer \blank
> \startviewerlayer[notvisibleandnotprint] not visible and not print 
> \stopviewerlayer \blank
> 
> \stoptext
> 
> and found out that we need an extra piece of info for acrobat to be happy. 
> I'll upload a beta with that addition.
> 
> I wonder if other viewers handle layers well.

I tried this today and report the results, curious to see how on my Apple 
Macintosh the following readers cope with this:

- Adobe Acrobat Reader DC version 15.016.20041 (most recent): does as is 
intended
- Apple Preview: shows all four, definitely a bad score for Apple here. 

Hans van der Meer




___
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
___

[NTG-context] Support for Optional Content Groups

2014-07-03 Thread Chris Chapman
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 ;)

Thanks in advance,

Chris Chapman
___
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
___


Re: [NTG-context] Support for Optional Content Groups

2014-07-03 Thread Wolfgang Schuster

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
___


Re: [NTG-context] Support for Optional Content Groups

2014-07-03 Thread Hans Hagen

On 7/3/2014 5:55 PM, Chris Chapman wrote:

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 ;)


(also see wolfgangs mail)

I tried this in acrobat:

\defineviewerlayer[visibleandprint]  [printable=yes,state=start]
\defineviewerlayer[visibleandnotprint]   [printable=no, state=start]
\defineviewerlayer[notvisibleandprint]   [printable=yes,state=stop]
\defineviewerlayer[notvisibleandnotprint][printable=no, state=stop]

\setupinteraction[state=start]

\starttext

\startviewerlayer[visibleandprint]   visible and print 
\stopviewerlayer \blank
\startviewerlayer[visibleandnotprint]visible and not print 
\stopviewerlayer \blank
\startviewerlayer[notvisibleandprint]not visible and print 
\stopviewerlayer \blank
\startviewerlayer[notvisibleandnotprint] not visible and not print 
\stopviewerlayer \blank


\stoptext

and found out that we need an extra piece of info for acrobat to be 
happy. I'll upload a beta with that addition.


I wonder if other viewers handle layers well.

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-


print-001.pdf
Description: Adobe PDF document
___
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
___

Re: [NTG-context] Support for Optional Content Groups

2014-07-03 Thread Chris Chapman
Thanks Hans and Wolfgang! Yes, it looks like most PDF viewers don't handle 
layers right now, but I'm fine with Acrobat for this use case. 

Chris Chapman
Pentandra


- Original Message -
 From: Hans Hagen pra...@wxs.nl
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Sent: Thursday, July 3, 2014 11:54:27 AM
 Subject: Re: [NTG-context] Support for Optional Content Groups
 
 On 7/3/2014 5:55 PM, Chris Chapman wrote:
  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 ;)
 
 (also see wolfgangs mail)
 
 I tried this in acrobat:
 
 \defineviewerlayer[visibleandprint]  [printable=yes,state=start]
 \defineviewerlayer[visibleandnotprint]   [printable=no, state=start]
 \defineviewerlayer[notvisibleandprint]   [printable=yes,state=stop]
 \defineviewerlayer[notvisibleandnotprint][printable=no, state=stop]
 
 \setupinteraction[state=start]
 
 \starttext
 
 \startviewerlayer[visibleandprint]   visible and print
 \stopviewerlayer \blank
 \startviewerlayer[visibleandnotprint]visible and not print
 \stopviewerlayer \blank
 \startviewerlayer[notvisibleandprint]not visible and print
 \stopviewerlayer \blank
 \startviewerlayer[notvisibleandnotprint] not visible and not print
 \stopviewerlayer \blank
 
 \stoptext
 
 and found out that we need an extra piece of info for acrobat to be
 happy. I'll upload a beta with that addition.
 
 I wonder if other viewers handle layers well.
 
 Hans
 
 
 -
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
   | www.pragma-pod.nl
 -
 
 ___
 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
 ___
___
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
___