summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-05-24 21:20:13 +0000
committerKarl Berry <karl@freefriends.org>2019-05-24 21:20:13 +0000
commit08389ad18f40230695bf434e4a1a5de4f83b1862 (patch)
tree14df0a84ac7f7f8d94f84434f2de2e900d1e4398 /Master/texmf-dist/doc
parenteae1ca2f57626195fe6deb2dc89a6aa8936c1110 (diff)
ocgx2 (24may19)
git-svn-id: svn://tug.org/texlive/trunk@51213 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r--Master/texmf-dist/doc/latex/ocgx2/ChangeLog6
-rw-r--r--Master/texmf-dist/doc/latex/ocgx2/README.txt97
2 files changed, 85 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/latex/ocgx2/ChangeLog b/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
index 9fe8420a144..db7e8bbe97d 100644
--- a/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
+++ b/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
@@ -1,3 +1,9 @@
+2019-05-24
+ * v0.41: ocgx2.sty
+ * v0.15: ocgbase.sty
+ * new: `ocmd' environment (PDF Optional content membership dictionary)
+ * fix: passing driver options to expl3
+
2019-01-02
* v0.40: ocgx2.sty
* fix: merge request incorporated (latex3 end-of-2018 deprecations)
diff --git a/Master/texmf-dist/doc/latex/ocgx2/README.txt b/Master/texmf-dist/doc/latex/ocgx2/README.txt
index e1788656734..87ef4e555ef 100644
--- a/Master/texmf-dist/doc/latex/ocgx2/README.txt
+++ b/Master/texmf-dist/doc/latex/ocgx2/README.txt
@@ -24,15 +24,17 @@ packages and adds support for all known engines and back-ends including
To enable dvipdfmx support, pass `dvipdfmx' globally as a class option.
Also, it adds some minor improvements and bug fixes, such as package
-options, remembering option settings of re-opened ocgs, correct behaviour
+options, remembering option settings of re-opened OCGs, correct behaviour
of layer switching links that were themselves placed on layers, correct
-listing of (nested) ocgs in the layers tab of PDF viewers, compatibility
+listing of (nested) OCGs in the layers tab of PDF viewers, compatibility
with the `animate' and `media9' packages.
* New features:
+ PDF layers extending over page breaks
- + grouping PDF layers into Radio Button Groups
+ + OCMDs (Optional Content Membership Dictionaries) for creating layers
+ with complex visibility dependency
+ + grouping OCGs into Radio Button Groups
+ additional keys for the TikZ interface of package `ocgx'
+ re-implementing `hyperref's `ocgcolorlinks' option for creating
OCG coloured links, which are printed on paper in the default
@@ -43,11 +45,17 @@ with the `animate' and `media9' packages.
2. Usage
========
-\usepackage[<options>]{ocgx2}
+ \usepackage[<options>]{ocgx2}
-\begin{ocg}[<options>]{<layer name>}{<layer id>}{<initial visibility>}
- ... material to be put on a PDF layer ...
-\end{ocg}
+ \begin{ocg}[<options>]{<layer name>}{<OCG id>}{<initial visibility>}
+ ... material to be put on a PDF layer ...
+ \end{ocg}
+
+ \begin{ocmd}[<OCMD id>]{[<visibility policy>][,<visibility expression>]}
+ ... material to be put on a PDF layer ...
+ visibility calculated by <visibility expression> (Boolean expression) from
+ other OCGs visibility, or according to <visibility policy>
+ \end{ocmd}
With <initial visibility> = ( on | true | 1 ) | ( off | false | 0 )
@@ -73,19 +81,72 @@ of the PDF viewer, automatically hides the previously visible layer.
Option `radiobtngrp' can be used repeatedly for the same OCG in order
to add the layer to more than one Radio Button Group.
-`ocg' environments can be nested and span multiple pages.
+`ocg' as well as `ocmd' environments can be nested and span multiple pages.
See the `ocg-p' manual about the environment usage and the meaning of
the remaining options:
texdoc ocg-p
-Clickable links for switching PDF layer visibility are created with:
- \switchocg[<trigger>]{<layer IDs to toggle, space separated>}{<link text>}
- \showocg[<trigger>]{<layer IDs to switch ON, space separated>}{<link text>}
- \hideocg[<trigger>]{<layer IDs to switch OFF, space separated>}{<link text>}
- \actionsocg[<trigger>]{<IDs to toggle>}{<IDs to switch ON>}{<IDs to switch OFF>}{<link text>}
+3. The `ocmd' environment (Optional Content Membership Dictionary)
+==================================================================
+
+ \begin{ocmd}[<OCMD id>]{[<visibility policy>][,<visibility expression>]}
+ ... material to be put on a PDF layer ...
+ \end{ocmd}
+
+This environment creates a PDF layer whose visibility is determined by the
+current visibilities of other OCGs in the document according to at most one
+visibility policy plus at most one visibility expression. If both are given
+(with a comma in between) `<visibility expression>' takes precedence over
+`<visibility policy>', but the latter may serve as a fallback in older PDF
+viewers.
+
+`<OCMD id>' is an optional identifier which can be used to re-open the same
+layer with the same visibility setting at another place further down in the
+document.
+
+A `<visibility policy>' can be _one_ of
+
+ \AllOn{<OCG id 1>, <OCG id 2>, ...}
+ \AnyOn{<OCG id 1>, <OCG id 2>, ...}
+ \AnyOff{<OCG id 1>, <OCG id 2>, ...}
+ \AllOff{<OCG id 1>, <OCG id 2>, ...}
+
+All four directives take a list of OCG ids from wich the OCMD visibility is
+calculated. If the condition represented by the policy is met, the content
+associated with the OCMD is shown. The listed OCGs can be defined anywhere in
+the document. These directives can neither be combined nor nested in order to
+define the policy. Thus, a visibility policy has limited capabilities.
+
+A `<visibility expression>' is much more flexible than a policy. Arbitrarily
+complex visibility relationships can be formulated, based on the Boolean
+functions
+
+ \And{<item a>, <item b>, ...}
+ \Or{<item i>, <item j>, ...}
+ \Not{<item n>}
+
+In the argument list, items represent OCG ids and nested Boolean
+functions. As nesting of the three functions is possible, any thinkable
+visibility relationship can be defined. Note that `\Not{...}' accepts only one
+item, either an OCG id or a nested function. Also note that Boolean functions
+and policy directives cannot be intermixed.
+
+As a trivial example, the visibility expression equivalent of the policy
+directive `\AllOff{...}' is written as `\Not{ \Or{ ... } }'.
+
+
+4. Clickable links for switching PDF layer visibility
+=====================================================
+
+The available commands are
+
+ \switchocg[<trigger>]{<OCG ids to toggle, space separated>}{<link text>}
+ \showocg[<trigger>]{<OCG ids to switch ON, space separated>}{<link text>}
+ \hideocg[<trigger>]{<OCG ids to switch OFF, space separated>}{<link text>}
+ \actionsocg[<trigger>]{<ids to toggle>}{<ids to switch ON>}{<ids to switch OFF>}{<link text>}
For details about their usage, read the `ocgx' package manual:
@@ -98,16 +159,16 @@ the commands listed above. Choose one of
onmousenter, onmouseexit, onmousedown, onmouseup, onmouseall
for <trigger>. In order to listen to more than one mouse event, use
-`onmouseall'. Layer IDs in the mandatory argument(s) must then be grouped with
+`onmouseall'. Layer ids in the mandatory argument(s) must then be grouped with
commas as follows:
<mouse-enter group>, <mouse-exit group>, <mouse-down group>, <mouse-up group>
Any of these groups may be left empty in order to configure only some
-mouse triggers. Inside the groups, layer IDs are separated by space.
+mouse triggers. Inside the groups, OCG ids are separated by space.
-3. Package option `ocgcolorlinks'
+5. Package option `ocgcolorlinks'
=================================
Is a re-implementation of the same `hyperref' option for creating OCG-
@@ -133,7 +194,7 @@ For example:
\ocglinkprotect{\includegraphics{ctan-lion}}!}
-4. Usage with TikZ
+5. Usage with TikZ
==================
`ocgx2' uses code from file `tikzlibraryocgx.code.tex' by P. Gaborit to
@@ -157,7 +218,7 @@ their usage:
The key `/tikz/ocg/opts' was added to the list in section
`How to add TikZ scopes into OCGs' in the `ocgx' manual:
- /tikz/ocg/opts={<ocg options>}
+ /tikz/ocg/opts={<OCG options>}
It allows passing `ocg'-environment options (`viewocg', `printocg', `exportocg',
`showingui', `radiobtngrp') to the TikZ scope.