diff options
Diffstat (limited to 'macros/latex-dev/base/doc.dtx')
-rw-r--r-- | macros/latex-dev/base/doc.dtx | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/macros/latex-dev/base/doc.dtx b/macros/latex-dev/base/doc.dtx index a6af48b88a..05256d878f 100644 --- a/macros/latex-dev/base/doc.dtx +++ b/macros/latex-dev/base/doc.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 1993-2024 +% Copyright (C) 1993-2025 % The LaTeX Project and any individual authors listed elsewhere % in this file. % @@ -45,7 +45,7 @@ %<+package> %<+package>\ProvidesPackage{doc} %<+shortvrb>\ProvidesPackage{shortvrb} -%<+package|shortvrb> [2024/10/23 v3.0q +%<+package|shortvrb> [2024/12/25 v3.0q %<+package|shortvrb> Standard LaTeX documentation package V3 (FMi)] %\catcode`\<=12 % @@ -972,9 +972,23 @@ % index entries \\ % \hspace*{30pt} Special macros for \* % \end{quote} -% Such an entry might be produced with the line: +% Such an entry might be produced with the line %\begin{verbatim} -% \index{index entries\levelchar Special macros for \*} +% \index{index entries>Special macros for \*} +%\end{verbatim} +% assuming that \verb=>= is the \cs{levelchar} used by the index +% processor. + +% You can't use \cs{levelchar} in this situation because if \cs{index} +% is directly used in the document then it's argument is written out +% fully verbatim. However, if you define your own index commands, +% expansion will happen on the way to the \texttt{.idx} file; and in +% that case you can use \cs{levelchar}---this is what the \pkg{doc} +% macros do. This then allows to change the indexing syntax easily, e.g., +%\begin{verbatim} +% \newcommand\ltxconcept[2]{\index{#1\levelchar#2}} +% ... +% \ltxconcept{index entries}{Special macros for \*} %\end{verbatim} % % |