我无法让最简单的 beamer+minted 示例运行。这是我的 latex 代码
\documentclass{beamer}
\usepackage{minted}
\begin{document}
\begin{frame}[fragile]
\begin{minted}{python}
class X(object):
pass
\end{minted}
\end{frame}
\end{document}
我正在像这样运行 pdflatex
pdflatex -shell-escape main
并不断收到以下错误
! Argument of \@gobble has an extra }.
<inserted text>
\par
l.14 \end{document}
Runaway argument?
! Paragraph ended before \@gobble was complete.
<to be read again>
\par
l.14 \end{document}
! Argument of \@firstofone has an extra }.
<inserted text>
\par
l.14 \end{document}
Runaway argument?
! Paragraph ended before \@firstofone was complete.
<to be read again>
\par
l.14 \end{document}
! Undefined control sequence.
\beamer@saveanother ->\let \beamer@savedif
=\ifbeamer@anotherslide
l.14 \end{document}
! Incomplete \iffalse; all text was ignored after line 14.
<inserted text>
\fi
l.14 \end{document}
Runaway text?
rm "main.pyg/\def \gdef {}\def \let \next =\relax \gdef {}{\par }\def \ETC.
! Forbidden control sequence found while scanning text of \write.
<inserted text>
}
l.14 \end{document}
Runaway text?
rm "main.pyg/\def \gdef {}\def \let \next =\relax \gdef {}{\par }\def \ETC.
! Forbidden control sequence found while scanning text of \write.
<inserted text>
}
l.14 \end{document}
sh: -c: line 0: unexpected EOF while looking for matching `"'
sh: -c: line 1: syntax error: unexpected end of file
[2] (./main.aux)
如果我只是忽略这些错误(例如,通过传递 -interaction=nonstopmode),我确实会得到一个大部分看起来不错的 pdf 文档;问题是最后有一个额外的页面,其中包含单词“document”。
有什么想法可能出错了吗?我在两个不同的 Linux 系统上尝试了这个示例,但两次都出现了相同的错误。
谢谢。