texlive[48801] Master/texmf-dist: ocgx2 (1oct18) [recommit]

commits+karl at tug.org commits+karl at tug.org
Tue Oct 2 03:06:49 CEST 2018


Revision: 48801
          http://tug.org/svn/texlive?view=revision&revision=48801
Author:   karl
Date:     2018-10-02 03:06:48 +0200 (Tue, 02 Oct 2018)
Log Message:
-----------
ocgx2 (1oct18) [recommit]

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	2018-10-02 01:06:26 UTC (rev 48800)
+++ trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog	2018-10-02 01:06:48 UTC (rev 48801)
@@ -1,3 +1,7 @@
+2018-10-01
+	* v0.39: ocgx2.sty
+	* fix: ocgcolorlinks: simpler and better don't-spill-link-colour prevention
+
 2018-09-27
 	* v0.38: ocgx2.sty
 	* fix: /ocglinkprotect{...} underfull box message and colour issue when

Modified: trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty	2018-10-02 01:06:26 UTC (rev 48800)
+++ trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty	2018-10-02 01:06:48 UTC (rev 48801)
@@ -38,8 +38,8 @@
 \RequirePackage{xparse}
 \RequirePackage{l3keys2e}
 
-\def\g at ocgxii@date at tl{2018/09/27}
-\def\g at ocgxii@version at tl{0.38}
+\def\g at ocgxii@date at tl{2018/10/01}
+\def\g at ocgxii@version at tl{0.39}
 
 \ProvidesExplPackage{ocgx2}{\g at ocgxii@date at tl}{\g at ocgxii@version at tl}
 {ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
@@ -153,9 +153,6 @@
 \ProcessKeysOptions{ocgx2}
 \sys_if_engine_xetex:T{
   \bool_gset_true:N\g_ocgxii_dvipdfmx_bool
-  %we use the period `.' from this downscaled font at the end of ocgcolorlinks,
-  %preventing empty links from flooding the page with link color
-  \font\g_ocgxii_lmroman_tl="[lmroman5-regular.otf]"~scaled~1
 }
 
 \RequirePackage{ocgbase} %also loads pdfbase.sty
@@ -777,6 +774,15 @@
 \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
 
+%we'll be using the downscaled space character (32) from the pzdr
+% (dingbats) font at the end of every ocgcolorlink in order to prevent
+% empty links from flooding the page with link colour
+\cs_new_nopar:Npn\ocgxii_tiny_space_char:{
+  \group_begin:
+    \font\l_tmpa_tl=pzdr~scaled~1\l_tmpa_tl\char32
+  \group_end:
+}
+
 \bool_if:nTF{\sys_if_output_dvi_p: && !\g_ocgxii_dvipdfmx_bool}{
   % non-breakable links in dvips
   \cs_new_protected_nopar:Nn\ocgxii_enable_ocglinks:{
@@ -836,20 +842,9 @@
       \pbs_literal:nn{page}{q~7~Tr}
     }
     \cs_gset_nopar:Nn\ocgxii_colourlink_end:{
-      %this should keep empty link annots from flooding the page with link colour
-      \sys_if_output_pdf:TF{
-        % with pdftex/luatex we provide a default glyph (`.') which we place
-        % beyond the page limits
-        \vbox_to_zero:n{
-          \vss
-          \hbox_overlap_right:n{\skip_horizontal:n{2\paperwidth}.}
-          \skip_vertical:n{2\paperheight}
-        }
-      }{
-        %with XeLaTeX we place an invisibly downscaled `.' from the LM font
-        %directly after the link text
-        \sys_if_engine_xetex:T{\hbox_overlap_left:n{\g_ocgxii_lmroman_tl .}}
-      }
+      %a tiny space char should keep empty link annots from flooding the page
+      % with link colour
+      \hbox_overlap_left:n{\ocgxii_tiny_space_char:}
       \ocgbase_oc_bdc:n{\ocgxii at OCPrint}
         \pbs_literal:nn{page}{-88888~-88888~99999~99999~re~f}
       \ocgbase_oc_emc:



More information about the tex-live-commits mailing list