dirtree 与 dtx-file 冲突

dirtree 与 dtx-file 冲突

当我尝试生成文件文档时发生以下错误dtx

! Use of \next doesn't match its definition.
<argument>  
            .1 \meta {Catalog’s ID}\DTcomment {This is a unique ID}. 
l.42 % }

我有一个my-documentation.ins文件:

\input docstrip.tex
\preamble
\endpreamble
\generate{\file{my-documentation.tex}{\from{my-documentation.dtx}{documentation}}}
\endbatchfile

和一个my-documentation.dtx文件:

% \iffalse meta-comment
% This file may be distributed ...
% \fi
%
% \iffalse
%<*driver>
\documentclass{ltxdoc}
\usepackage{dirtree}
\begin{document}
    \DocInput{my-documentation.dtx}
\end{document}
%</driver>
% \fi
%
% \CheckSum{0}
%
% \CharacterTable
% {Upper-case     \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote \"      Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent \'      Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than \>      Question mark \?
%   Commercial at \@     Left bracket \[      Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent \`      Left brace    \{     Vertical bar \|
%   Right brace   \}     Tilde         \~}
%
%
% \changes{v0.0.1}{2018/08/08}{Initial version} %
% \DoNotIndex{} %
% \title{title}
% \author{author}
% \maketitle
% \begin{figure}[!htb]
% \dirtree{%
% .1 \meta{Catalog’s ID}\DTcomment{This is a unique ID}.
% }
% \caption{Structure of required files}
% \label{file-structure}
% \end{figure}
% \Finale
\endinput

显然我遗漏了一些东西,但是使用 进行编译时包dirtree总是失败pdflatex

答案1

%不是 doc 文件中的注释,因此您需要

% \dirtree{^^A

不是

% \dirtree{%

相关内容