![beamer + minted 最基本的例子失败(不是“脆弱”的问题)](https://linux22.com/image/277547/beamer%20%2B%20minted%20%E6%9C%80%E5%9F%BA%E6%9C%AC%E7%9A%84%E4%BE%8B%E5%AD%90%E5%A4%B1%E8%B4%A5%EF%BC%88%E4%B8%8D%E6%98%AF%E2%80%9C%E8%84%86%E5%BC%B1%E2%80%9D%E7%9A%84%E9%97%AE%E9%A2%98%EF%BC%89.png)
我无法让最简单的 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 系统上尝试了这个示例,但两次都出现了相同的错误。
谢谢。