summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ocgx2
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-03-19 03:02:55 +0000
committerNorbert Preining <norbert@preining.info>2024-03-19 03:02:55 +0000
commit1b771c1e303b8274d871ee6bd4bdd5ba03bdd152 (patch)
tree812adf200ad09972163243b4e4341a3991852c14 /macros/latex/contrib/ocgx2
parent9c8677e09c2c9b0d9593f26ed226411d68160a4e (diff)
CTAN sync 202403190302
Diffstat (limited to 'macros/latex/contrib/ocgx2')
-rw-r--r--macros/latex/contrib/ocgx2/ChangeLog4
-rw-r--r--macros/latex/contrib/ocgx2/ocgx2.sty60
2 files changed, 16 insertions, 48 deletions
diff --git a/macros/latex/contrib/ocgx2/ChangeLog b/macros/latex/contrib/ocgx2/ChangeLog
index 5b61a6ee13..65ca63a13d 100644
--- a/macros/latex/contrib/ocgx2/ChangeLog
+++ b/macros/latex/contrib/ocgx2/ChangeLog
@@ -1,3 +1,7 @@
+2024-03-18
+ * v0.57: ocgx2.sty
+ * fix: fixed link border in pdfmanagement-testphase version
+
2022-12-16
* v0.56: ocgx2.sty
* fix: documentation
diff --git a/macros/latex/contrib/ocgx2/ocgx2.sty b/macros/latex/contrib/ocgx2/ocgx2.sty
index c3b91609cd..a1081f88ac 100644
--- a/macros/latex/contrib/ocgx2/ocgx2.sty
+++ b/macros/latex/contrib/ocgx2/ocgx2.sty
@@ -43,8 +43,8 @@
%
% The Current Maintainer of this work is A. Grahn.
- \def\g@ocgxii@date@tl{2022/12/16}
- \def\g@ocgxii@version@tl{0.56}
+ \def\g@ocgxii@date@tl{2024/03/18}
+ \def\g@ocgxii@version@tl{0.57}
\ProvidesExplPackage{ocgx2}{\g@ocgxii@date@tl}{\g@ocgxii@version@tl}
{ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
@@ -79,11 +79,6 @@
to~the~preamble~of~your~document.
}
- \msg_set:nnn{ocgx2}{beamer~and~ocgcolorlinks}{
- Option~`ocgcolorlinks'~cannot~be~used~with~class~Beamer.\\\\
- Using~`colorlinks'~instead.
- }
-
% package options
\msg_set:nnnn{ocgx2}{unknown~package~option}{Unknown~package~option~`#1'.}{
@@ -1279,15 +1274,6 @@
\DeclareDocumentCommand\ocglinkprotect{m}{#1}
}
- % option ocgcolorlinks and beamer are not compatible
- \bool_if:NT\l_ocgxii_ocgcolorlinks_bool{
- \@ifclassloaded{beamer}{
- \bool_set_false:N\l_ocgxii_ocgcolorlinks_bool
- \hypersetup{colorlinks}
- \msg_warning:nn{ocgx2}{beamer~and~ocgcolorlinks}
- }{}
- }
-
\bool_if:NT\l_ocgxii_ocgcolorlinks_bool{
\@ifpackageloaded{hyperref}{
\Hy@colorlinkstrue
@@ -1553,6 +1539,7 @@
\endgroup
%%%%%%%%%%%%%%%%%%%%%% /pdfmanagement-testphase %%%%%%%%%%%%%%%%%%%
+% pdfmanagement-testphase version starts here
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ocgx2.sty
@@ -1592,8 +1579,8 @@
%
% The Current Maintainer of this work is A. Grahn.
-\def\g@ocgxii@date@tl{2022/08/04}
-\def\g@ocgxii@version@tl{0.55}
+\def\g@ocgxii@date@tl{2024/03/18}
+\def\g@ocgxii@version@tl{0.57}
\ProvidesExplPackage{ocgx2}{\g@ocgxii@date@tl}{\g@ocgxii@version@tl}
{ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
@@ -1620,19 +1607,6 @@
\msg_set:nnn{ocgx2}{generic~msg}{#1\\#2}
-\msg_set:nnn{ocgx2}{missing~package}{
- Package~`#1'~must~be~loaded~before~ocgx2.\\\\
- Put\\\\
- \space\space\string\usepackage#2{#1}\\
- \space\space\string\usepackage[ocgcolorlinks]{ocgx2}\\\\
- to~the~preamble~of~your~document.
-}
-
-\msg_set:nnn{ocgx2}{beamer~and~ocgcolorlinks}{
- Option~`ocgcolorlinks'~cannot~be~used~with~class~Beamer.\\\\
- Using~`colorlinks'~instead.
-}
-
% package options
\msg_set:nnnn{ocgx2}{unknown~package~option}{Unknown~package~option~`#1'.}{
@@ -2524,6 +2498,9 @@
\int_gincr:N\g_ocgxii_widcount_int
}
}{
+ \bool_if:NF\g_ocgxii_hyperref_loaded_bool{
+ \pdfannot_dict_put:nnn{link/GoTo}{Border}{[0~0~0]}
+ }
%line-breakable annotation
\pbs_pdflink:nn{
%look and feel of hyperref internal links
@@ -2673,29 +2650,16 @@
% with some improvements
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\bool_if:NT\l_ocgxii_ocgcolorlinks_bool{
- % option ocgcolorlinks and beamer are not compatible
- \@ifclassloaded{beamer}{
- \bool_set_false:N\l_ocgxii_ocgcolorlinks_bool
- \hypersetup{colorlinks}
- \msg_warning:nn{ocgx2}{beamer~and~ocgcolorlinks}
- }{}
- % make sure that hyperref has been loaded if `ocgcolorlinks' is set via
- % pkg option
- \@ifpackageloaded{hyperref}{
- \hypersetup{ocgcolorlinks}
- }{
- \msg_error:nnn{ocgx2}{missing~package}{hyperref}
- }
-}
-
% we'll be using the downscaled space character (32) from the pzdr
% (dingbats) font at the start and at the end of every ocgcolorlink
\cs_new_protected_nopar:Npn\ocgxii_tiny_space_char:{
\group_begin: \font\l_tmpa_tl=pzdr~scaled~1\l_tmpa_tl\char32 \group_end:
}
-\@ifpackageloaded{hyperref}{
+\bool_new:N\g_ocgxii_hyperref_loaded_bool
+\AddToHook{package/hyperref/after}{
+ \bool_gset_true:N\g_ocgxii_hyperref_loaded_bool
+ \bool_if:NT\l_ocgxii_ocgcolorlinks_bool{\hypersetup{ocgcolorlinks}}
\bool_if:nTF{\sys_if_output_dvi_p: && !\g_ocgxii_dvipdfmx_bool}{
\prop_map_inline:Nn\c__hyp_map_hyp_annot_prop{
\hook_gremove_code:nn{pdfannot/link/#2/begin}{hyp/ocg}