summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ocgx2
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
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')
-rw-r--r--Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty9
-rw-r--r--Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty56
2 files changed, 22 insertions, 43 deletions
diff --git a/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty b/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty
index cf1cc3f94be..3646351314e 100644
--- a/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty
+++ b/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty
@@ -31,7 +31,7 @@
% #2: usage dict (may be empty), see PDF reference:
% http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/
% pdf_reference_1-7.pdf#G9.3858276
-% #3: initial visibility (1|0|true|false|on|off)
+% #3: initial visibility (1|0|true|false|on|off|visible|invisible)
%
% \ocgbase_last_ocg:
% \ocgbase@last@ocg (LaTeX2e version)
@@ -97,7 +97,7 @@
\RequirePackage{atenddvi}
\RequirePackage{pdfbase}
-\ProvidesExplPackage{ocgbase}{2016/03/11}{0.6}
+\ProvidesExplPackage{ocgbase}{2017/03/09}{0.7}
{support package for ocgx2.sty}
\tl_new:N\g_ocgbase_ocgs_tl %takes ocg object refs
@@ -212,13 +212,14 @@
%macro for inserting new OCG object
\cs_new_nopar:Nn\ocgbase_new_ocg:nnn{
\pbs_pdfobj:nnn{}{dict}{
- /Type/OCG/Name~(#1)~\tl_if_blank:oF{#2}{/Usage<<#2>>}
+ /Type/OCG/Name~(#1)~\str_if_eq_x:nnF{#2}{}{/Usage<<#2>>}
}
\tl_gput_right:Nx\g_ocgbase_ocgs_tl{~\pbs_pdflastobj:}
\bool_if:nT{
\str_if_eq_x_p:nn{#3}{0} ||
\str_if_eq_x_p:nn{#3}{off} ||
- \str_if_eq_x_p:nn{#3}{false}
+ \str_if_eq_x_p:nn{#3}{false} ||
+ \str_if_eq_x_p:nn{#3}{invisible}
}{
\ocgbase_add_to_off_list:n{\pbs_pdflastobj:}
}
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={%