ltxdoc is a LaTeX class for typesetting the documentation in
.dtx files. The class loads package
doc that does most of the work including the definition of environment
.dtx files the documentation lines usually starts with
% to get ignored, when
docstrip extracts the code. Instead of
% why is my percent sign gone?
\relax % not here
the common use case is rather:
%verbatim stuff that should be set without the
%percent signs at the start of the lines.
verbatim to ignore the percent sign at the start of a line. This is done by macro
\check@percent that can be redefined locally:
% percent sign
\relax % and here