[latex3-commits] [git/LaTeX3-latex3-latex2e] doc-v3beta: Don't do special index if no indexing is done (d086b3b9)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri Nov 26 10:30:52 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : doc-v3beta
Link       : https://github.com/latex3/latex2e/commit/d086b3b93ec2efbc7952b84dd8985ead21a12a7b

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

commit d086b3b93ec2efbc7952b84dd8985ead21a12a7b
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri Nov 26 10:30:52 2021 +0100

    Don't do special index if no indexing is done


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

d086b3b93ec2efbc7952b84dd8985ead21a12a7b
 base/doc.dtx | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/base/doc.dtx b/base/doc.dtx
index 0bab05e9..fed57e7c 100644
--- a/base/doc.dtx
+++ b/base/doc.dtx
@@ -5568,12 +5568,15 @@
 %    The package adds new definitions for \cs{special at index} into
 %    \cs{CodelineIndex} and \cs{PageIndex} but since we are loading it
 %    very late we are already past them (in the preamble). So we test
-%    the final state and do it here.
+%    the final state and do it here, if necessary.
 %    \begin{macrocode}
-  \ifcodeline at index
-    \let\special at index\HD at codeline@wrindex
+  \ifx\special at index\@gobble  % do we write index entries at all?
   \else
-    \let\special at index\HD at page@wrindex
+    \ifcodeline at index
+      \let\special at index\HD at codeline@wrindex
+    \else
+      \let\special at index\HD at page@wrindex
+    \fi
   \fi
 %    \end{macrocode}
 %    That package also adds extra code into |\index| entries but it doesn't





More information about the latex3-commits mailing list.