summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-03-09 22:51:40 +0000
committerKarl Berry <karl@freefriends.org>2017-03-09 22:51:40 +0000
commit3c97af82d660bc556cc6517fbc3c214152a8c09f (patch)
tree88244f0722d5a036c85e8ac870b51423ca36ee95 /Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
parent07135271a2a6e50be6d964a0d941a18a177a7292 (diff)
ocgx2 (8mar17)
git-svn-id: svn://tug.org/texlive/trunk@43446 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty56
1 files changed, 17 insertions, 39 deletions
diff --git a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
index 36db66b8cfd..3e1114c2eb9 100644
--- a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
+++ b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
@@ -37,7 +37,7 @@
\RequirePackage{xparse}
\RequirePackage{l3keys2e}
-\ProvidesExplPackage{ocgx2}{2017/03/07}{0.18}
+\ProvidesExplPackage{ocgx2}{2017/03/09}{0.19}
{ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
%creating global definitions
@@ -386,15 +386,9 @@
\IfValueTF{#2}{#2}{triggerocg=onmouseup}
}{#3}
\hbox_set:Nn\l_tmpa_box{#4}
- %dummy Widget, workaround for AR bug;
+ %dummy Widget, workaround for pre AR-DC bug;
%see https://forums.adobe.com/message/5787612#5787612
- \bool_if:nT{
- !\cs_if_exist:NTF\ocgxii@insert@OC{
- \tl_if_blank_p:V\ocgxii@insert@OC
- }{
- \c_true_bool
- }
- }{\pbs_pdfannot:nnnn{
+ \str_if_eq_x:nnF{\ocgxii@insert@OC}{}{\pbs_pdfannot:nnnn{
\dim_use:N\box_wd:N\l_tmpa_box}{
\dim_use:N\box_ht:N\l_tmpa_box}{
\dim_use:N\box_dp:N\l_tmpa_box
@@ -427,7 +421,7 @@
}{
\ocgxii_ocglist_process_idlist:nn{triggerocg=onmouseup}{#3}
\pbs_pdflink:nn{
- /Subtype/Link
+ /Subtype/Link\ocgxii@insert@OC
/A <</S/SetOCGState/State [
\str_if_eq:VnF\l_ocgxii_u_list_tl{}{/Toggle~\l_ocgxii_u_list_tl}]>>
/Border [0~0~0]
@@ -446,15 +440,9 @@
\IfValueTF{#2}{#2}{triggerocg=onmouseup}
}{#3}
\hbox_set:Nn\l_tmpa_box{#4}
- %dummy Widget, workaround for AR bug;
+ %dummy Widget, workaround for pre AR-DC bug;
%see https://forums.adobe.com/message/5787612#5787612
- \bool_if:nT{
- !\cs_if_exist:NTF\ocgxii@insert@OC{
- \tl_if_blank_p:V\ocgxii@insert@OC
- }{
- \c_true_bool
- }
- }{\pbs_pdfannot:nnnn{
+ \str_if_eq_x:nnF{\ocgxii@insert@OC}{}{\pbs_pdfannot:nnnn{
\dim_use:N\box_wd:N\l_tmpa_box}{
\dim_use:N\box_ht:N\l_tmpa_box}{
\dim_use:N\box_dp:N\l_tmpa_box
@@ -487,7 +475,7 @@
}{
\ocgxii_ocglist_process_idlist:nn{triggerocg=onmouseup}{#3}
\pbs_pdflink:nn{
- /Subtype/Link
+ /Subtype/Link\ocgxii@insert@OC
/A <</S/SetOCGState/State [
\str_if_eq:VnF\l_ocgxii_u_list_tl{}{/ON~\l_ocgxii_u_list_tl}]>>
/Border [0~0~0]
@@ -506,15 +494,9 @@
\IfValueTF{#2}{#2}{triggerocg=onmouseup}
}{#3}
\hbox_set:Nn\l_tmpa_box{#4}
- %dummy Widget, workaround for AR bug;
+ %dummy Widget, workaround for pre AR-DC bug;
%see https://forums.adobe.com/message/5787612#5787612
- \bool_if:nT{
- !\cs_if_exist:NTF\ocgxii@insert@OC{
- \tl_if_blank_p:V\ocgxii@insert@OC
- }{
- \c_true_bool
- }
- }{\pbs_pdfannot:nnnn{
+ \str_if_eq_x:nnF{\ocgxii@insert@OC}{}{\pbs_pdfannot:nnnn{
\dim_use:N\box_wd:N\l_tmpa_box}{
\dim_use:N\box_ht:N\l_tmpa_box}{
\dim_use:N\box_dp:N\l_tmpa_box
@@ -547,7 +529,7 @@
}{
\ocgxii_ocglist_process_idlist:nn{triggerocg=onmouseup}{#3}
\pbs_pdflink:nn{
- /Subtype/Link
+ /Subtype/Link\ocgxii@insert@OC
/A <</S/SetOCGState/State [
\str_if_eq:VnF\l_ocgxii_u_list_tl{}{/OFF~\l_ocgxii_u_list_tl}]>>
/Border [0~0~0]
@@ -584,15 +566,9 @@
\tl_set_eq:NN\l_ocgxii_tohide_d_tl\l_ocgxii_d_list_tl
\tl_set_eq:NN\l_ocgxii_tohide_u_tl\l_ocgxii_u_list_tl
\hbox_set:Nn\l_tmpa_box{#6}
- %dummy Widget, workaround for AR bug;
+ %dummy Widget, workaround for pre AR-DC bug;
%see https://forums.adobe.com/message/5787612#5787612
- \bool_if:nT{
- !\cs_if_exist:NTF\ocgxii@insert@OC{
- \tl_if_blank_p:V\ocgxii@insert@OC
- }{
- \c_true_bool
- }
- }{\pbs_pdfannot:nnnn{
+ \str_if_eq_x:nnF{\ocgxii@insert@OC}{}{\pbs_pdfannot:nnnn{
\dim_use:N\box_wd:N\l_tmpa_box}{
\dim_use:N\box_ht:N\l_tmpa_box}{
\dim_use:N\box_dp:N\l_tmpa_box
@@ -678,7 +654,7 @@
\ocgxii_ocglist_process_idlist:nn{triggerocg=onmouseup}{#5}
\tl_set_eq:NN\l_ocgxii_tohide_u_tl\l_ocgxii_u_list_tl
\pbs_pdflink:nn{
- /Subtype/Link
+ /Subtype/Link\ocgxii@insert@OC
/A <</S/SetOCGState
/State [
\str_if_eq:VnF{\l_ocgxii_toswitch_u_tl}{}{
@@ -841,7 +817,7 @@
\usetikzlibrary{calc}
% Copyright notice: The code that follows until the end of the file was
-% taken from Paul Gaborit's `tikzlibraryocgx.code.tex' with minor modification.
+% taken from Paul Gaborit's `tikzlibraryocgx.code.tex' with minor additions.
\tikzset{
ocg/.style={ocg/.cd,#1,/tikz/.cd},
ocg={
@@ -856,10 +832,12 @@
status/false/.style={visibility=0},
status/on/.style={visibility=1},
status/off/.style={visibility=0},
+ status/1/.style={visibility=1},
+ status/0/.style={visibility=0},
% default values
name=,
opts=,
- status=visible,
+ status=on,
% ref
ref/.style={
/tikz/execute at begin scope={%