texlive[44044] Master/texmf-dist: ocgx2 (25apr17)

commits+karl at tug.org commits+karl at tug.org
Wed Apr 26 00:27:31 CEST 2017


Revision: 44044
          http://tug.org/svn/texlive?view=revision&revision=44044
Author:   karl
Date:     2017-04-26 00:27:30 +0200 (Wed, 26 Apr 2017)
Log Message:
-----------
ocgx2 (25apr17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
    trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty

Modified: trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog	2017-04-25 22:27:20 UTC (rev 44043)
+++ trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog	2017-04-25 22:27:30 UTC (rev 44044)
@@ -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)

Modified: trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty	2017-04-25 22:27:20 UTC (rev 44043)
+++ trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty	2017-04-25 22:27:30 UTC (rev 44044)
@@ -37,8 +37,8 @@
 \RequirePackage{xparse}
 \RequirePackage{l3keys2e}
 
-\def\g at ocgxii@date at tl{2017/03/30}
-\def\g at ocgxii@version at tl{0.24}
+\def\g at ocgxii@date at tl{2017/04/25}
+\def\g at ocgxii@version at tl{0.25}
 
 \ProvidesExplPackage{ocgx2}{\g at ocgxii@date at tl}{\g at ocgxii@version at 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 at setpdfborder{
+        \Hy at setpdfborder\g_ocgxii_patch_tl
+        \ifx\@pdfhighlight\@empty\else/H\@pdfhighlight\fi
+        \ifx\@linkbordercolor\relax\else/C[\@linkbordercolor]\fi
+        \ifHy at pdfa /F~4\fi
+      }{
+        /Border~[0~0~0]
+      }
+    }{
+      \cs_if_exist:NTF\Hy at colorlink{
+        \Hy at colorlink\@linkcolor#6\Hy at endcolorlink\Hy at 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



More information about the tex-live-commits mailing list