I fight with the strange and useless entries of the index in dtx files.
It can reproduced with
% \iffalse
%<*driver>
\ProvidesFile{dtxcode.tex}
%</driver>
%
%<*driver>
\documentclass{ltxdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\listfiles
\begin{document}
\DocInput{dtxcode.tex}
\PrintIndex
\end{document}
%</driver>
% \fi
%%
% \DescribeMacro{\foobar} Prints out foobar
%
% \Finale
\endinput
the result is
foobar= \subitem *+\foobar+, \usage{1}
printed as shown here in the pdf.
Anyway: I would like to switch of the index functionality of doc.sty completely and replace it with my own. It tries to add EVERY latex command used in the index. With my current code this is hundrets of entries which have nothing to do with any command defined by the package.
docfrom indexing foreign macros? - TeX - LaTeX Stack Exchange or hyperref - disable index creation in dtx file - TeX - LaTeX Stack Exchange although I didn't test it. – user202729 Nov 25 '22 at 23:55latexmkusegind.ist, and package writing - How to preventdocfrom indexing foreign macros? - TeX - LaTeX Stack Exchange for one specific to\DoNotIndex. – user202729 Feb 24 '24 at 23:20