提取包:在特定点停止提取

提取包:在特定点停止提取

我使用该extract包从主文档中提取大纲。我不想将附录中的任何内容包含在大纲中,因此我正在寻找任何方法将active主文本后的选项设置为非活动状态。

有没有什么办法可以从某个点开始停止所有内容的提取?

\documentclass{scrartcl}
\usepackage{verbatim}
\let\synopsis\comment
\let\endsynopsis\endcomment
\usepackage[active,
    generate=synopsis,
    extract-env={synopsis},
    extract-cmd={section},
]{extract}
\begin{extract}
    \newenvironment{synopsis}{}{}
\end{extract}

\begin{document}
\section{Section 1}
\begin{synopsis}
here something for the synopsis
\end{synopsis}

\section{Section2}
here something for the main document

% Start appendix here
\begin{extractskip} % this doesn't do anything
\section{I dont want this in the synopsis}
\begin{synopsis}
This neither
\end{synopsis}
\end{extractskip}
\end{document}

extractskip在这里不起作用,但这基本上是我需要的。或者extract = false从这一点开始抑制提取...

相关内容