minted
我尝试使用 TeXworks 包并选择选项来编译 tex 文本XeLaTex+MakeIndes+BibTeX
。
当我尝试按原样构建时出现错误:
! Package minted Error: You must invoke LaTeX with the -shell-escape flag.
See the minted package documentation for explanation.
Type H <return> for immediate help.
...
l.102 \newminted
{cpp}{texcomments}
?
当我添加参数时,--shell-escape
如下图所示:
我收到错误:
ERROR: MiKTeX encountered an internal error.
ERROR: Info:
ERROR: Source: Libraries\MiKTeX\Core\Session/SessionImpl.h
ERROR: Line: 617
Sorry, but "MiKTeX Compiler Driver" did not succeed.
You may want to visit the MiKTeX project page, if you need help.
你知道我将如何修复它吗?我使用以下示例进行构建:
\documentclass[a4paper]{report}
\usepackage{calc}
\usepackage[a4paper,hmargin={0.07\paperwidth,0.07\paperwidth}]{geometry}
\usepackage[cache=false]{minted}
\newminted{json}{texcomments}
\usepackage{lipsum}
\begin{document}
\lipsum[1-2]
\begin{jsoncode}
{
otaku=true,
anime_types=['echi','harem','hentai' ]
}
\end{jsoncode}
\lipsum[3-4]
\end{document}
我已经安装了它们python
和pygments
python 依赖项。