[latex3-commits] [git/LaTeX3-latex3-latex3] main: Cover hyperref bookmark case (e3b3ab121)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Jul 1 12:41:11 CEST 2022


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/e3b3ab1216196838ce7d905007976026d21787f5

>---------------------------------------------------------------

commit e3b3ab1216196838ce7d905007976026d21787f5
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Jul 1 11:41:11 2022 +0100

    Cover hyperref bookmark case


>---------------------------------------------------------------

e3b3ab1216196838ce7d905007976026d21787f5
 l3kernel/l3text.dtx | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/l3kernel/l3text.dtx b/l3kernel/l3text.dtx
index 240c187e7..72d17f0df 100644
--- a/l3kernel/l3text.dtx
+++ b/l3kernel/l3text.dtx
@@ -289,6 +289,10 @@
 %<@@=text>
 %    \end{macrocode}
 %
+%    \begin{macrocode}
+\cs_generate_variant:Nn \tl_if_head_eq_meaning_p:nN { o }
+%    \end{macrocode}
+%
 % \subsection{Internal auxiliaries}
 %
 % \begin{variable}{\s_@@_stop}
@@ -903,7 +907,9 @@
 %   At this stage, either we have a control sequence or a simple character:
 %   split and handle. The need to check for non-protected actives arises
 %   from handling of legacy input encodings: they need to end up in a
-%   representation we can deal with in further processing.
+%   representation we can deal with in further processing. The tests for
+%   explicit parts of the \LaTeXe{} UTF-8 mechanism cover the case of
+%   bookmarks, where definitions change and are no longer protected.
 %    \begin{macrocode}
 \cs_new:Npn \@@_expand_explicit:N #1
   {
@@ -913,9 +919,14 @@
         \bool_lazy_and:nnTF
           { \token_if_active_p:N #1 }
           {
-            ! \bool_lazy_or_p:nn
-              { \token_if_protected_macro_p:N #1 }
-              { \token_if_protected_long_macro_p:N #1 }
+            ! \bool_lazy_any_p:n
+              {
+                { \token_if_protected_macro_p:N #1 }
+                { \token_if_protected_long_macro_p:N #1 }
+                { \tl_if_head_eq_meaning_p:oN {#1} \UTFviii at two@octets }
+                { \tl_if_head_eq_meaning_p:oN {#1} \UTFviii at three@octets }
+                { \tl_if_head_eq_meaning_p:oN {#1} \UTFviii at four@octets }
+              }
           }
           { \exp_after:wN \@@_expand_loop:w #1 }
           {





More information about the latex3-commits mailing list.