summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-02 01:06:48 +0000
committerKarl Berry <karl@freefriends.org>2018-10-02 01:06:48 +0000
commitc800d2599d3338a87e8a51d99d4806b8fab99679 (patch)
treec4a80a3ea1f3233548fc8b9e3e865834e93cc414 /Master
parentaffdb00d7883e8921d99d1de8cc739f689c460b4 (diff)
ocgx2 (1oct18) [recommit]
git-svn-id: svn://tug.org/texlive/trunk@48801 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/ocgx2/ChangeLog4
-rw-r--r--Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty33
2 files changed, 18 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/latex/ocgx2/ChangeLog b/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
index 5c3ba4c9055..dd25c7f22a4 100644
--- a/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
+++ b/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
@@ -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
diff --git a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
index c30b8e6fc47..62bc121b9c2 100644
--- a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
+++ b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
@@ -38,8 +38,8 @@
\RequirePackage{xparse}
\RequirePackage{l3keys2e}
-\def\g@ocgxii@date@tl{2018/09/27}
-\def\g@ocgxii@version@tl{0.38}
+\def\g@ocgxii@date@tl{2018/10/01}
+\def\g@ocgxii@version@tl{0.39}
\ProvidesExplPackage{ocgx2}{\g@ocgxii@date@tl}{\g@ocgxii@version@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@OCPrint}
\pbs_literal:nn{page}{-88888~-88888~99999~99999~re~f}
\ocgbase_oc_emc: