[latex3-commits] [git/LaTeX3-latex3-pdfresources] testlinkstuff: new \Hy at pstringdef version (f5ec214)
Ulrike Fischer
fischer at troubleshooting-tex.de
Tue May 21 16:07:59 CEST 2019
Repository : https://github.com/latex3/pdfresources
On branch : testlinkstuff
Link : https://github.com/latex3/pdfresources/commit/f5ec2140299fc738b4ff4a5a61fbc8ce5d840ba9
>---------------------------------------------------------------
commit f5ec2140299fc738b4ff4a5a61fbc8ce5d840ba9
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue May 21 16:07:59 2019 +0200
new \Hy at pstringdef version
>---------------------------------------------------------------
f5ec2140299fc738b4ff4a5a61fbc8ce5d840ba9
hluatex-experimental.def | 54 ++++++++++++++++++++++++++++------------------
1 file changed, 33 insertions(+), 21 deletions(-)
diff --git a/hluatex-experimental.def b/hluatex-experimental.def
index 276c70e..ec3a052 100644
--- a/hluatex-experimental.def
+++ b/hluatex-experimental.def
@@ -9,7 +9,7 @@
[2019/04/07 v0.2 %
Hyperref driver for luaTeX]
\RequirePackage{xparse,etoolbox}
-
+\RequirePackage{l3str-convert,pdfresources}
%%\Hy at VersionCheck{hluatex.def}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ExplSyntaxOn
@@ -205,15 +205,28 @@
\HyPL at SetPageLabels
}%
\fi
-%UF removed manual Hy at pstringdef definition, as \pdf at escapestring should be always defined
-%if needed a kernel command should be provided for other drivers ...
- \def\Hy at pstringdef#1#2{%
- \begingroup
- \edef~{\string~}%
- \xdef\Hy at gtemp{\pdf at escapestring{#2}}%
- \endgroup
- \let#1\Hy at gtemp
- }%
+%UF replace Hy at pstringdef definition.
+\ExplSyntaxOn
+\cs_new:Npn \__hyp_pstringdef:Nn #1 #2
+{
+ \group_begin:
+ \char_set_catcode_other:N \~
+ \char_set_active_eq:NN \~ \c_tilde_str
+ \char_set_catcode_active:N \~
+ \exp_args:NNx % or only o?
+ \str_gset_convert:Nnnn \g_tmpa_str {#2}{}{utf8/string} %utf8 because of hyperref
+ \group_end:
+ \str_set_eq:NN#1 \g_tmpa_str
+}
+\cs_set_eq:NN\Hy at pstringdef \__hyp_pstringdef:Nn
+\ExplSyntaxOff
+% \def\Hy at pstringdef#1#2{%
+% \begingroup
+% \edef~{\string~}%
+% \xdef\Hy at gtemp{\pdf at escapestring{#2}}%
+% \endgroup
+% \let#1\Hy at gtemp
+% }%
\providecommand*{\XR at ext}{pdf}
\Hy at setbreaklinks{true}
\def\HyPat at ObjRef{%
@@ -1397,8 +1410,16 @@
}
\ExplSyntaxOff
\providecommand*{\Fld at pageobjref}{}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname pdf at escapestring\endcsname\relax
+\ifcsname pdf at escapestring\endcsname
+ \def\Hy at escapeform#1{%
+ \ifHy at pdfescapeform
+ \let\Hy at escapestring\pdfescapestring
+ \else
+ \let\Hy at escapestring\@firstofone
+ \fi
+ }%
+ \Hy at escapeform{}%
+\else
\let\Hy at escapestring\@firstofone
\def\Hy at escapeform#1{%
\ifHy at pdfescapeform
@@ -1429,15 +1450,6 @@
}%
\fi
}%
-\else
- \def\Hy at escapeform#1{%
- \ifHy at pdfescapeform
- \let\Hy at escapestring\pdfescapestring
- \else
- \let\Hy at escapestring\@firstofone
- \fi
- }%
- \Hy at escapeform{}%
\fi
\def\PDFForm at Name{%
\PDFForm@@Name\Fld at name
More information about the latex3-commits
mailing list