svmono 与 'draft' 导致 lstlistings 没有输出

svmono 与 'draft' 导致 lstlistings 没有输出

为什么下面没有输出?

\documentclass[draft]{svmono}
\usepackage{listings}
\begin{document}

\begin{lstlisting}
  theorem :: GROUP_10:14
    for G being finite Group,
    p being prime (natural number) holds
      (for H being Subgroup of G st
           H is_p-group_of_prime p holds
\end{lstlisting}

\end{document}

(显然,通过关闭“草稿”可以轻松解决这个问题——但我想了解发生了什么。)

答案1

它与 无关svmono。类选项是global选项,因此它被传递给listings 的listings选项draft,据我所知,它会抑制文件处理。listings 文档说

draft
     The package prints no stand alone files, but shows the captions and defines
     the corresponding labels. Note that a global \documentclass-option draft
     is recognized, so you don't need to repeat it as a package option.

相关内容