[latex3-commits] [git/LaTeX3-latex3-latex3] main: Minor code simplification in l3doc (a67bf5341)

Bruno Le Floch blflatex at gmail.com
Fri Apr 30 17:37:23 CEST 2021


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

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

commit a67bf5341092ba962c88681c1618d768f8f360c4
Author: Bruno Le Floch <blflatex at gmail.com>
Date:   Fri Apr 30 17:37:23 2021 +0200

    Minor code simplification in l3doc


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

a67bf5341092ba962c88681c1618d768f8f360c4
 l3kernel/l3doc.dtx | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/l3kernel/l3doc.dtx b/l3kernel/l3doc.dtx
index 9bf1e3278..0debde18e 100644
--- a/l3kernel/l3doc.dtx
+++ b/l3kernel/l3doc.dtx
@@ -3148,7 +3148,9 @@ and all files in that bundle must be distributed together.
 %   the first items of nested \tn{trivlist}, but these were not closed
 %   properly with \tn{endtrivlist}.  Also, it interacted in surprising
 %   ways with \pkg{hyperref} targets.  Now, we collect typeset macro
-%   names by hand in the box \cs{l_@@_macro_box}.  Note the space |\ |.
+%   names by hand in the box \cs{l_@@_macro_box}.  The fixed-size space
+%   |\MacroFont\ | could be replaced by an customizable horizontal
+%   space; it is important for it to be the same for all macros.
 %   |#1| is the macro name, |#2| whether to add |TF|.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_macro_typeset_one:nN #1#2
@@ -3156,9 +3158,8 @@ and all files in that bundle must be distributed together.
     \vbox_set:Nn \l_@@_macro_box
       {
         \vbox_unpack_drop:N \l_@@_macro_box
-        \hbox { \llap { \__codedoc_print_macroname:nN {#1} #2
-            \MacroFont       % <----- without it the \ is in lmr10 if a link is made
-            \      
+        \hbox { \llap { \@@_print_macroname:nN {#1} #2
+            \MacroFont \
         } }
       }
     \int_incr:N \l_@@_macro_int
@@ -3443,20 +3444,15 @@ and all files in that bundle must be distributed together.
     \@bsphack
     \begingroup
       \HD at target
-      \let\HDorg at encapchar\encapchar
-      \edef\encapchar usage
-        {
-          \HDorg at encapchar hdclindex{\the\c at HD@hypercount}{usage}
-        }
       \index
         {
           #1\actualchar{\protect\ttfamily#1}~(option)
-          \encapchar usage
+          \encapchar hdclindex{\the\c at HD@hypercount}{usage}
         }
       \index
         {
           options:\levelchar#1\actualchar{\protect\ttfamily#1}
-          \encapchar usage
+          \encapchar hdclindex{\the\c at HD@hypercount}{usage}
         }
     \endgroup
     \@esphack





More information about the latex3-commits mailing list.