Changes

Jump to navigation Jump to search
591 bytes added ,  12:19, 28 May 2020
m
no edit summary
< [[Layers]] | [[VisualsBasics]] | [[Presentations]] >
PDF has a concept of layers that you can enable and disable (at least in a few viewers). This has nothing to do with ConTeXt’s [[Layers]].
There’s no other documentation yet, maybe have a look into the source sources {{src|attr-lay.mkiv}}, {{src|attr-lay.lua}} and {{src|lpdf-ren.lua}}. It’s also used in some presentation styles.
<texcode>
\input knuth
 
\viewerlayer[Plane]{Some more hidden text...}
\stoptext
</texcode>
 
You can switch the visibility of layers with the JavaScript functions HideLayer and VideLayer (from {{src|scrn-fld.mkvi}}:
 
<texcode>
\defineviewerlayer[test]
 
\startviewerlayer[test]Hide Me\stopviewerlayer
 
\defineoverlay
[WithTest]
[{\overlayrollbutton[HideLayer{test}][VideLayer{test}]}]
 
\framed[background=WithTest]{toggle}
</texcode>
 
 
Viewer layers are known to work within {{cmd|setlayer}} (see [[Layers]]), e.g. {{src|meta-ini.mkiv}}.

Navigation menu