Why does the following .dtx not compile, while the equivalent .tex file does? (You must name the file error.dtx, that's what \DocInput includes.)
DTX:
% \iffalse meta-comment
%<*driver>
\documentclass{ltxdoc}
\input pgfutil-common
\makeatletter
\def\myitem#1{%
\pgfutil@in@{,}{#1}%
\ifpgfutil@in@
\myitem@#1\@end
\else
\myitem@#1,\@end
\fi
}
\def\myitem@#1,#2\@end{\item\texttt{#1}\quad\marginpar{\small\it#2}}
\makeatother
\begin{document}
\DocInput{error.dtx}
\end{document}
%</driver>
% \fi
% \begin{description}
% \myitem{align,key} This is documentation for key \emph{align}.
% \end{description}
% \endinput
LaTeX:
\documentclass{ltxdoc}
\input pgfutil-common
\makeatletter
\def\myitem#1{%
\pgfutil@in@{,}{#1}%
\ifpgfutil@in@
\myitem@#1\@end
\else
\myitem@#1,\@end
\fi
}
\def\myitem@#1,#2\@end{\item\texttt{#1}\quad\marginpar{\small\it#2}}
\makeatother
\begin{document}
\begin{description}
\myitem{align,key} This is documentation for key \emph{align}.
\end{description}
\end{document}
