[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop, main: correct version check for ocglinks for dvips (debf895)
Ulrike Fischer
fischer at troubleshooting-tex.de
Thu Mar 18 16:12:17 CET 2021
Repository : https://github.com/latex3/pdfresources
On branches: develop,main
Link : https://github.com/latex3/pdfresources/commit/debf89511b968a5b482b578f70cb6ea1c773aaa0
>---------------------------------------------------------------
commit debf89511b968a5b482b578f70cb6ea1c773aaa0
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Thu Mar 18 16:12:17 2021 +0100
correct version check for ocglinks for dvips
>---------------------------------------------------------------
debf89511b968a5b482b578f70cb6ea1c773aaa0
hyperref-generic.dtx | 44 ++++++++++++++++++++++++--------------------
1 file changed, 24 insertions(+), 20 deletions(-)
diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 78becd4..8c60439 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -2732,19 +2732,9 @@
% These are the keys for ocgcolors. We try to disable it
% for pdf version below 1.5
% \begin{macrocode}
-\pdf_version_compare:NnTF < {1.5}
- {
- \keys_define:nn { hyp / setup }
- {
- ,_ocgcolorlinks .code:n =
- {
- \msg_warning:nnxx
- { hyp }
- { ignore-deprecated-or-unknown-option-in-pdf-version }
- { ocgcolorlinks } { \pdf_version_major:.\pdf_version_minor: }
- }
- }
- }
+\bool_lazy_or:nnTF
+ { \pdf_version_compare_p:Nn > {1.4} }
+ { \str_if_eq_p:ee{\pdf_version_major:}{-1} }
{
\keys_define:nn { hyp / setup }
{
@@ -2759,6 +2749,18 @@
,_ocgcolorlinks .default:n = true
}
}
+ {
+ \keys_define:nn { hyp / setup }
+ {
+ ,_ocgcolorlinks .code:n =
+ {
+ \msg_warning:nnxx
+ { hyp }
+ { ignore-deprecated-or-unknown-option-in-pdf-version }
+ { ocgcolorlinks } { \pdf_version_major:.\pdf_version_minor: }
+ }
+ }
+ }
\keys_define:nn { hyp / setup }
{
@@ -2779,7 +2781,15 @@
\seq_map_inline:Nn \c_@@_annot_types_seq
{
- \pdf_version_compare:NnTF < {1.5}
+ \bool_lazy_or:nnTF
+ { \pdf_version_compare_p:Nn > {1.4} }
+ { \str_if_eq_p:ee{\pdf_version_major:}{-1} }
+ {
+ \keys_define:nn { hyp / setup }
+ {
+ ,ocgcolor#1 .bool_set:c = { l_hyp_annot_ocgcolor#1_bool }
+ }
+ }
{
\keys_define:nn { hyp / setup }
{
@@ -2793,12 +2803,6 @@
}
}
}
- {
- \keys_define:nn { hyp / setup }
- {
- ,ocgcolor#1 .bool_set:c = { l_hyp_annot_ocgcolor#1_bool }
- }
- }
}
% \end{macrocode}
% \end{hypkey}
More information about the latex3-commits
mailing list.