2

Consider the following attempt:

% \iffalse
%<*driver>
\ProvidesFile{duck.tex}
%</driver>
%
%<*driver>
\documentclass{l3doc}

\begin{document}
\DocInput{duck.dtx}
\PrintIndex
\end{document}
%</driver>
% \fi
% \DoNotIndex{^^A
%   \def,^^A Works.
%   \csname\space\endcsname,^^A Doesn't work.
%   \ ,^^A Doesn't work.
% }
% \begin{documentation}
%   \begin{function}{\foobar}
%     Prints out `foo bar'.
%   \end{function}
% \end{documentation}
% \begin{implementation}
% \begin{macro}{\foobar}
%   This is the code for \cs{foobar}.
%    \begin{macrocode}
\def\foo{foo}
\def\bar{bar}
\def\foobar{\foo\ \bar}
%    \end{macrocode}
% \end{macro}
% \end{implementation}
% \Finale

It produces:

1

I understand why it produces \␣ in the 'Symbols' section of the index, but I want to stop this behavior. What should I add to \DoNotIndex?

2

1 Answer 1

2

It is a bug in the doc package. For the moment you can get it suppressed with

\expandafter\DoNotIndex\expandafter{\bslash}

but obviously that isn't the final solution and will not work the moment a final solution is in place. More details are in the github issue that was opened.

5
  • Thanks a lot for the attention and the solution. It would be great if you could notify here when it gets fixed.
    – Niranjan
    Commented Nov 3, 2022 at 15:43
  • 1
    it is fixed in a branch and will soon get merged into latex-dev so the next distribution of latex-dev should have it. In the main release it will show up with 2023-06 Commented Nov 4, 2022 at 17:32
  • Thanks a lot @FrankMittelback!
    – Niranjan
    Commented Nov 5, 2022 at 4:59
  • @Niranjan close but not quite right :-) under this name it never reached me Commented Nov 15, 2022 at 20:46
  • Oops, sorry! For a long time I was having a wrong spelling in my mind.
    – Niranjan
    Commented Nov 16, 2022 at 13:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .