summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/ocgx2/README
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/ocgx2/README')
-rw-r--r--Master/texmf-dist/doc/latex/ocgx2/README123
1 files changed, 77 insertions, 46 deletions
diff --git a/Master/texmf-dist/doc/latex/ocgx2/README b/Master/texmf-dist/doc/latex/ocgx2/README
index f6d3b376f68..e1788656734 100644
--- a/Master/texmf-dist/doc/latex/ocgx2/README
+++ b/Master/texmf-dist/doc/latex/ocgx2/README
@@ -15,56 +15,29 @@ packages `ocgx' by Paul Gaborit and `ocg-p' by Werner Moshammer for the
creation of PDF Layers.
It re-implements the functionality of the `ocg', `ocgx' and `ocg-p'
-packages and adds support for all known engines and back-ends including:
+packages and adds support for all known engines and back-ends including
* LaTeX --> dvips --> ps2pdf/Distiller
* (Xe)LaTeX --> (x)dvipdfmx
* pdfLaTeX, luaLaTeX
+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
of layer switching links that were themselves placed on layers, correct
listing of (nested) ocgs in the layers tab of PDF viewers, compatibility
with the `animate' and `media9' packages.
-To enable dvipdfmx support, pass `dvipdfmx' globally as a class option.
-
* New features:
+ PDF layers extending over page breaks
+ grouping PDF layers into Radio Button Groups
- + re-implementing `hyperref`'s `ocgcolorlinks` option for creating
+ + 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
text colour and which can, unlike the original `hyperref'
- implementation, extend over line and page breaks. With
- pdfLaTeX/LuaLaTeX, OCG links can be nested.
-
-Coloured OCG links are enabled with
-
- \usepackage{hyperref} % do NOT set [ocgcolorlinks] here!
- \usepackage[ocgcolorlinks]{ocgx2}
-
-`ocgx2' uses code from file `tikzlibraryocgx.code.tex' by P. Gaborit to
-enable TikZ styles for creating PDF Layers and clickable layer switching
-links in the `tikzpicture' context.
-
-Just say:
-
- \usepackage[tikz]{ocgx2}
-
-instead of
-
- \usepackage{tikz}
- \usetikzlibrary{ocgx}
-
-to enable these TikZ styles and read the `ocgx' documentation about
-their usage:
-
- texdoc ocgx
-
-The /tikz/ocg/opts=<ocg options> parameter adds to the list in section
-`How to add TikZ scopes into OCGs' in the `ocgx' manual. It allows
-passing ocg environment options (see below) to the TikZ scope.
+ implementation, extend over line and page breaks.
2. Usage
@@ -87,8 +60,8 @@ and <options> : viewocg = always | never | ifvisible
showingui (to be preferred over `listintoolbar' of ocgx/ocg-p)
radiobtngrp = <group name> (string; environment-only option)
- tikz (package-only option, see above)
- ocgcolorlinks (package-only option, see above)
+ tikz (package-only option)
+ ocgcolorlinks (package-only option)
Package options have global scope. Environment options override package
options locally.
@@ -109,24 +82,43 @@ the remaining options:
Clickable links for switching PDF layer visibility are created with:
- \switchocg{<layer IDs to toggle, space separated>}{<link text>}
- \showocg{<layer IDs to switch ON, space separated>}{<link text>}
- \hideocg{<layer IDs to switch OFF, space separated>}{<link text>}
- \actionsocg{<IDs to toggle>}{<IDs to switch ON>}{<IDs to switch OFF>}{<link text>}
+ \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>}
For details about their usage, read the `ocgx' package manual:
texdoc ocgx
-For compatibility with the `ocg-p' package, the following commands have
-been provided:
+By default, links are triggered on mouse-click. Other triggers are possible
+with `ocgx2'. For this, `ocgx2' provides the optional argument [<trigger>] to
+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
+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.
- \toggleocgs[triggerocg=...]{<layer IDs to toggle, space separated>}{<link text>}
- \showocgs[triggerocg=...]{<layer IDs to switch ON, space separated>}{<link text>}
- \hideocgs[triggerocg=...]{<layer IDs to switch OFF, space separated>}{<link text>}
- \setocgs[triggerocg=...]{<IDs to toggle>}{<IDs to switch ON>}{<IDs to switch OFF>}{<link text>}
-See the `ocg-p' package manual for the meaning of `triggerocg=...'.
+3. Package option `ocgcolorlinks'
+=================================
+
+Is a re-implementation of the same `hyperref' option for creating OCG-
+coloured links, which are printed on paper in the default text colour.
+
+ \usepackage{hyperref} % do NOT set [ocgcolorlinks] here!
+ \usepackage[ocgcolorlinks]{ocgx2}
+
+Unlike the original `hyperref' implementation, OCG-coloured links are now
+allowed to extend over line and page breaks. Moreover, with pdfLaTeX/LuaLaTeX,
+OCG coloured links can be nested.
Breakable OCG coloured links work best with normal text as link text. If
the link text is mixed with graphical content, such as from external files or
@@ -141,6 +133,45 @@ For example:
\ocglinkprotect{\includegraphics{ctan-lion}}!}
+4. Usage with TikZ
+==================
+
+`ocgx2' uses code from file `tikzlibraryocgx.code.tex' by P. Gaborit to
+enable TikZ styles for creating PDF Layers and clickable layer switching
+links in the `tikzpicture' context.
+
+Just say:
+
+ \usepackage[tikz]{ocgx2}
+
+instead of
+
+ \usepackage{tikz}
+ \usetikzlibrary{ocgx}
+
+to enable these TikZ styles and read the `ocgx' documentation about
+their usage:
+
+ texdoc ocgx
+
+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>}
+
+It allows passing `ocg'-environment options (`viewocg', `printocg', `exportocg',
+`showingui', `radiobtngrp') to the TikZ scope.
+
+Moreover, TikZ objects to be turned into OCG switching hyperlinks (section "How
+to transform nodes or paths into clickable links" in the `ocgx' manual) accept
+the additional key
+
+ /tikz/trigger ocg = onmousenter | onmouseexit | onmousedown | onmouseup
+ | onmouseall
+
+which makes them listen to various mouse events, as explained above.
+
+
* * *