From 08389ad18f40230695bf434e4a1a5de4f83b1862 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 24 May 2019 21:20:13 +0000 Subject: ocgx2 (24may19) git-svn-id: svn://tug.org/texlive/trunk@51213 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/ocgx2/ChangeLog | 6 ++ Master/texmf-dist/doc/latex/ocgx2/README.txt | 97 ++++++++++++++++++++++------ 2 files changed, 85 insertions(+), 18 deletions(-) (limited to 'Master/texmf-dist/doc/latex/ocgx2') 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[]{ocgx2} + \usepackage[]{ocgx2} -\begin{ocg}[]{}{}{} - ... material to be put on a PDF layer ... -\end{ocg} + \begin{ocg}[]{}{}{} + ... material to be put on a PDF layer ... + \end{ocg} + + \begin{ocmd}[]{[][,]} + ... material to be put on a PDF layer ... + visibility calculated by (Boolean expression) from + other OCGs visibility, or according to + \end{ocmd} With = ( 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[]{}{} - \showocg[]{}{} - \hideocg[]{}{} - \actionsocg[]{}{}{}{} +3. The `ocmd' environment (Optional Content Membership Dictionary) +================================================================== + + \begin{ocmd}[]{[][,]} + ... 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) `' takes precedence over +`', but the latter may serve as a fallback in older PDF +viewers. + +`' 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 `' can be _one_ of + + \AllOn{, , ...} + \AnyOn{, , ...} + \AnyOff{, , ...} + \AllOff{, , ...} + +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 `' is much more flexible than a policy. Arbitrarily +complex visibility relationships can be formulated, based on the Boolean +functions + + \And{, , ...} + \Or{, , ...} + \Not{} + +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[]{}{} + \showocg[]{}{} + \hideocg[]{}{} + \actionsocg[]{}{}{}{} 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 . 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: , , , 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={} + /tikz/ocg/opts={} It allows passing `ocg'-environment options (`viewocg', `printocg', `exportocg', `showingui', `radiobtngrp') to the TikZ scope. -- cgit v1.2.3