================================== The `ocgx2' LaTeX Package Version 0.18 [2017/03/07] (C) 2015--\today Alexander Grahn ================================== 1. Introduction =============== This package serves as a drop-in replacement for the already existing 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: * LaTeX --> dvips --> ps2pdf/Distiller * (Xe)LaTeX --> (x)dvipdfmx * pdfLaTeX, luaLaTeX To enable dvipdfmx support, pass `dvipdfmx' globally as a class option. * New features: + layers extending across page breaks + grouping layers into Radio Button Groups + OCG coloured links for hyperref 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. Coloured links in the PDF viewer that are printed on paper in the default text colour 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= 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. 2. Usage ======== \usepackage[]{ocgx2} \begin{ocg}[]{}{}{} ... material to be put on a PDF layer ... \end{ocg} With = ( on | true | 1 ) | ( off | false | 0 ) and : viewocg = always | never | ifvisible printocg = always | never | ifvisible exportocg = always | never | ifvisible listintoolbar= always | never | iffirstuse not in ocgx, ocg-p: showingui (same as `listintoolbar') radiobtngrp = (string; environment-only option) tikz (package-only option, see above) ocgcolorlinks (package-only option, see above) Package options have global scope. Environment options override package options locally. Layers can be added to one or several Radio Button Groups using the new option `radiobtngrp'. From all layers within a Radio Button Group only one can be enabled at a time. Enabling a layer, e. g. in the Layers tab 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. 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{}{}{}{} 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: \toggleocgs[triggerocg=...]{}{} \showocgs[triggerocg=...]{}{} \hideocgs[triggerocg=...]{}{} \setocgs[triggerocg=...]{}{}{}{} See the `ocg-p' package manual for the meaning of `triggerocg=...'. * * * This material is subject to the LaTeX Project Public License version 1.3. See http://mirrors.ctan.org/help/Catalogue/licenses.lppl.html for the details of that license.