summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ocgx2
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-20 22:09:02 +0000
committerKarl Berry <karl@freefriends.org>2015-07-20 22:09:02 +0000
commit18c85ced132ad148f981205f76f18aac1792be5e (patch)
tree4a738c4444401ecb0921565c58a12424d7b8d77c /Master/texmf-dist/tex/latex/ocgx2
parent1c3f8e2799e3d29036be1ece4f5c7c5ff5e4b0d7 (diff)
ocgx2 (20jul15)
git-svn-id: svn://tug.org/texlive/trunk@37910 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ocgx2')
-rw-r--r--Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty23
1 files changed, 14 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
index 1e19692d5b3..f7c6e12b26b 100644
--- a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
+++ b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
@@ -47,7 +47,7 @@
}
}
-\ProvidesExplPackage{ocgx2}{2015/06/19}{0.6a}
+\ProvidesExplPackage{ocgx2}{2015/07/20}{0.7}
{ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
%re-implement ocg-p's `ocg' environment
@@ -58,10 +58,10 @@
\group_begin:
\ocgxii_reset_cmd_opts: % ... to the user-set package options
\tl_if_exist:cTF{ocgxii@#3}{ %re-open existing layer
- \tl_set:Nx\l_tempa_tl{\use:c{ocgxii@#3.opts},#1}
+ \tl_set:Nx\l_tempa_tl{\tl_use:c{ocgxii@#3.opts},#1}
\keys_set:nV{ocgxii/user}\l_tempa_tl
\int_compare:nT{\l_ocgxii_listno_tl=\c_zero}{
- \tl_gput_right:Nx\@ocgbase@ocgorder{~\use:c{ocgxii@#3}}
+ \tl_gput_right:Nx\@ocgbase@ocgorder{~\tl_use:c{ocgxii@#3}}
}
}{
\tl_gset:cn{ocgxii@#3.opts}{#1}
@@ -84,18 +84,23 @@
}
}
\bool_if:nT{
- !\cs_if_exist_p:c{OCGpdfobj#3} ||
- !\str_if_eq_x_p:nn{\use:c{OCGpdfobj#3}}{\use:c{ocgxii@#3}}
+% !\cs_if_exist_p:c{OCGpdfobj#3} || %lazy evaluation may cease to work
+% !\str_if_eq_x_p:nn{\use:c{OCGpdfobj#3}}{\tl_use:c{ocgxii@#3}}
+ !\cs_if_exist:cTF{OCGpdfobj#3}{
+ \str_if_eq_x_p:nn{\tl_use:c{OCGpdfobj#3}}{\tl_use:c{ocgxii@#3}}
+ }{
+ \c_false_bool
+ }
}{
\cs_if_exist:NF\g_ocgxii_rerunwarned_tl{
\tl_new:N\g_ocgxii_rerunwarned_tl
\AtEndDocument{\msg_warning:nn{ocgx2}{rerun}}
}
}
- \tl_gset:cx{OCGpdfobj#3}{\use:c{ocgxii@#3}}
- \seq_gput_left:Nx\g_fixocg_ocgstack_seq{\use:c{ocgxii@#3}}
+ \tl_gset:cx{OCGpdfobj#3}{\tl_use:c{ocgxii@#3}}
+ \seq_gput_left:Nx\g_fixocg_ocgstack_seq{\tl_use:c{ocgxii@#3}}
\group_end:
- \mix_pdfbdc:nn{/OC}{\use:c{ocgxii@#3}}
+ \mix_pdfbdc:nn{/OC}{\tl_use:c{ocgxii@#3}}
\ignorespaces
}{
\unskip
@@ -208,7 +213,7 @@
\cs_new:Nn\ocgxii_process_ocgref:NN{
\str_if_eq_x:nnF{#2}{}{
- \tl_if_exist:cTF{OCGpdfobj#2}{\tl_put_right:Nx#1{~\use:c{OCGpdfobj#2}}}{
+ \tl_if_exist:cTF{OCGpdfobj#2}{\tl_put_right:Nx#1{~\tl_use:c{OCGpdfobj#2}}}{
\msg_warning:nnx{ocgx2}{undefined~OCG}{#2}
\cs_if_exist:NF\g_ocgxii_refundefwarned_tl{
\tl_new:N\g_ocgxii_refundefwarned_tl