[latex3-commits] [git/LaTeX3-latex3-latex2e] master: do the index writing fix correctly (4849672)

Frank Mittelbach frank.mittelbach at latex-project.org
Thu Mar 15 12:28:53 CET 2018


Repository : https://github.com/latex3/latex2e
On branch  : master
Link       : https://github.com/latex3/latex2e/commit/484967225eddebc0938174d4deb52ac329fa91a7

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

commit 484967225eddebc0938174d4deb52ac329fa91a7
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Thu Mar 15 12:28:53 2018 +0100

    do the index writing fix correctly


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

484967225eddebc0938174d4deb52ac329fa91a7
 base/ltxdoc.dtx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/base/ltxdoc.dtx b/base/ltxdoc.dtx
index f6bdd4c..305b4e9 100644
--- a/base/ltxdoc.dtx
+++ b/base/ltxdoc.dtx
@@ -464,9 +464,11 @@
 %    \begin{macrocode}
 \gdef\codeline at wrindex#1{\if at filesw
 %    \end{macrocode}
-%    Set \cs{protect} to a suitable value in the index entries.
+%    Set \cs{protect} to a suitable value in the index entries (we can't use |\set at display@protect|
+%    as that would result in different numer of spaces after a command depending on the number of 
+%    expansion happening prior to writing the index).
 %    \begin{macrocode}
-        \set at display@protect
+        \let\protect\noexpand
         \immediate\write\@indexfile
             {\string\indexentry{#1}%
             {\filesep\number\c at CodelineNo}}\fi}%





More information about the latex3-commits mailing list