summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-25 22:27:30 +0000
committerKarl Berry <karl@freefriends.org>2017-04-25 22:27:30 +0000
commitc3f0bc533cd80b2f57105f0c361d232b7580557a (patch)
treebc792cd9c26be587fac4efe04b9e8b316cbcb651
parentc1688c1a2c002b6b0fb18ff59e9ca317e7a3b02a (diff)
ocgx2 (25apr17)
git-svn-id: svn://tug.org/texlive/trunk@44044 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/ocgx2/ChangeLog5
-rw-r--r--Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty29
2 files changed, 28 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/latex/ocgx2/ChangeLog b/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
index fdf2ee2934d..e25445944cc 100644
--- a/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
+++ b/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-25
+ * v0.25 : ocgx2.sty
+ * new:OCG switching links (\showocg, \hideocg etc.) with hyperref look
+ & feel if hyperref is loaded (link border or colorlinks/ocgcolorlinks)
+
2017-03-30
* v0.24 : ocgx2.sty
* fix: \ocglinkprotect{...} messing up the graphics state (CTM)
diff --git a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
index 76e68c39fca..f1e91adbf63 100644
--- a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
+++ b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
@@ -37,8 +37,8 @@
\RequirePackage{xparse}
\RequirePackage{l3keys2e}
-\def\g@ocgxii@date@tl{2017/03/30}
-\def\g@ocgxii@version@tl{0.24}
+\def\g@ocgxii@date@tl{2017/04/25}
+\def\g@ocgxii@version@tl{0.25}
\ProvidesExplPackage{ocgx2}{\g@ocgxii@date@tl}{\g@ocgxii@version@tl}
{ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
@@ -465,7 +465,10 @@
\dim_use:N\box_ht:N\l_tmpa_box}{
\dim_use:N\box_dp:N\l_tmpa_box
}{
- /Subtype/Widget/Ff~65536/FT/Btn/H/I
+ /Subtype/Widget/Ff~65536/FT/Btn/BS<</W~0>>
+ \cs_if_exist:NT\@pdfhighlight{
+ \ifx\@pdfhighlight\@empty\else/H\@pdfhighlight\fi
+ }
/T~(ocgx2@\int_use:N\g_ocgxii_widcount_int)
/AA <<
\str_if_eq_x:nnF{}{
@@ -549,8 +552,20 @@
\str_if_eq:VnF{\l_ocgxii_tohide_u_tl}{}{/OFF~\l_ocgxii_tohide_u_tl}
]
>>
- /Border [0~0~0]
- }{#6}
+ %look and feel of hyperref links, if hyperref has been loaded
+ \cs_if_exist:NTF\Hy@setpdfborder{
+ \Hy@setpdfborder\g_ocgxii_patch_tl
+ \ifx\@pdfhighlight\@empty\else/H\@pdfhighlight\fi
+ \ifx\@linkbordercolor\relax\else/C[\@linkbordercolor]\fi
+ \ifHy@pdfa /F~4\fi
+ }{
+ /Border~[0~0~0]
+ }
+ }{
+ \cs_if_exist:NTF\Hy@colorlink{
+ \Hy@colorlink\@linkcolor#6\Hy@endcolorlink\Hy@VerboseLinkStop
+ }{#6}
+ }
}
}
@@ -680,6 +695,7 @@
}
\seq_new:N\g_ocgxii_lnk_color_seq %stack of colours of currently open links
+\tl_new:N\g_ocgxii_patch_tl % `BorderArrayPatch' for dvips
\bool_if:nTF{\sys_if_output_dvi_p: && !\g_ocgxii_dvipdfmx_bool}{
% non-breakable links in dvips
@@ -694,6 +710,7 @@
\group_end:
}
}
+ \tl_gset:Nn\g_ocgxii_patch_tl{BorderArrayPatch}
}{
% pdftex,luatex,xetex,dvipdfmx:
% ocgcolorlinks that extend over line and page breaks
@@ -796,7 +813,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% tikz related code follows (to be enabled with package option `tikz')
+% TikZ related code follows (to be enabled with package option `tikz')
\bool_if:NF\l_ocgxii_tikz_bool{\endinput}
\ExplSyntaxOff