由于某种原因,minted 在我使用“\usepackage”的每一行上都给出“未定义控制序列”错误。我搜索了相关内容,但找不到适合我的答案。
错误:
! Undefined control sequence.
<argument> ... \PYGdefault {l+m+mi}{0}\PYGdefault
{p}{;}
l.12 ...n} \PYGdefault{l+m+mi}{0}\PYGdefault{p}{;}
我使用 TexMaker 和 MikTek。是的,我下载并安装了 Pygments 和 pygmentize。还使用了 -shell-escape。在我的文本上添加一些代码之前,一切都正常。代码是用
\begin{minted}{c}
code...
\end{minted}
编辑:例如:
\documentclass[12pt,a4paper]{abntex2}
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[left=3cm,right=2.5cm,top=3.cm,bottom=2.5cm]{geometry}
\usepackage{indentfirst}
\usepackage{abntex2cite}
\usepackage{minted}
\author{Gabriel Sussumu Kato}
\begin{document}
\begin{minted}{c}
#include <SDL.h>
int main(int argc, char *argv[])
{
SDL_Window *window = nullptr;
SDL_Init(SDL_INIT_VIDEO);
window = SDL_CreateWindow("Titulo", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_SHOWN);
SDL_QUIT();
return 0;
}
\end{minted}
\end{document}
\列表文件
abntex2.cls 2015/01/26 v1.9.3 abnTeX2
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
memoir.cls 2015/03/05 v3.7c configurable book, report, article document class
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
ifetex.sty 2011/12/15 v1.2 ifetex
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
mem12.clo 2010/10/19 v0.4b memoir class 12pt size option
mempatch.sty 2009/07/24 v6.0f Patches for memoir class v1.6180339
textcase.sty 2004/10/07 v0.07 Text only upper/lower case changing (DPC)
hyperref.sty 2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty 2012/04/25 v1.12 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty 2012/04/25 v1.12 Bundle oberdiek, subset generic (HO)
hobsub.sty 2012/04/25 v1.12 Construct package bundles (HO)
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
ifvtex.sty 2010/03/01 v1.5 Detect VTeX and its facilities (HO)
intcalc.sty 2007/09/27 v1.1 Expandable calculations with integers (HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty 2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty 2012/04/08 v1.3 Expandable calculations on big integers (HO)
bitset.sty 2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty 2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty 2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
hopatch.sty 2011/06/24 v1.1 Wrapper for package hooks (HO)
xcolor-patch.sty 2011/01/30 xcolor patch
atveryend.sty 2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty 2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty 2011/10/16 v3.4 Data extraction from label references (HO)
hycolor.sty 2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
auxhook.sty 2011/03/04 v1.3 Hooks for auxiliary files (HO)
kvoptions.sty 2011/06/30 v3.11 Key value format for package options (HO)
pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
url.sty 2013/09/16 ver 3.4 Verb mode for urls, etc.
memhfixc.sty 2013/05/30 v1.17 nameref/hyperref package fixes for memoir class
hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX
rerunfilecheck.sty 2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
bookmark.sty 2011/12/02 v1.24 PDF bookmarks (HO)
bkm-pdftex.def 2011/12/02 v1.24 bookmark driver for pdfTeX (HO)
babel.sty 2008/07/08 v3.8m The Babel package
bblopts.cfg 2006/07/31 v1.0 MiKTeX 'babel' configuration
portuges.ldf 2008/03/18 v1.2q Portuguese support from the babel system
enumitem.sty 2011/09/28 v3.5.2 Customized lists
inputenc.sty 2008/03/30 v1.1d Input encoding file
utf8.def 2008/04/05 v1.1m UTF-8 support for inputenc
t1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
ot1enc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
omsenc.dfu 2008/04/05 v1.1m UTF-8 support for inputenc
times.sty 2005/04/12 PSNFSS-v9.2a (SPQR)
fontenc.sty
t1enc.def 2005/09/27 v1.99g Standard LaTeX file
amsmath.sty 2013/01/14 v2.14 AMS math features
amstext.sty 2000/06/29 v2.01
amsgen.sty 1999/11/30 v2.0
amsbsy.sty 1999/11/29 v1.2d
amsopn.sty 1999/12/14 v2.01 operator names
amsfonts.sty 2013/01/14 v3.01 Basic AMSFonts support
amssymb.sty 2013/01/14 v3.01 AMS font symbols
geometry.sty 2010/09/12 v5.6 Page Geometry
geometry.cfg
indentfirst.sty 1995/11/23 v1.03 Indent first paragraph (DPC)
abntex2cite.sty 2015/01/26 v1.9.3 abnTeX2
calc.sty 2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
abntex2abrev.sty
relsize.sty 2003/07/04 ver 3.1
minted.sty 2015/01/31 v2.0 Yet another Pygments shim for LaTeX
fancyvrb.sty 2008/02/07
float.sty 2001/11/08 v1.3d Float enhancements (AL)
ifplatform.sty 2010/10/22 v0.4 Testing for the operating system
catchfile.sty 2011/03/01 v1.6 Catch the contents of a file (HO)
etoolbox.sty 2015/03/10 v2.1b e-TeX tools for LaTeX (JAW)
xstring.sty 2013/10/13 v1.7c String manipulations (C Tellechea)
lineno.sty 2005/11/02 line numbers on paragraphs v4.41
t1pcr.fd 2001/06/04 font definitions for T1/pcr.
_minted-TCC/default.pygstyle
t1ptm.fd 2001/06/04 font definitions for T1/ptm.
nameref.sty 2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty 2010/12/03 v1.4 Cleanup title references (HO)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
supp-pdf.mkii
t1phv.fd 2001/06/04 scalable font definitions for T1/phv.
_minted-TCC/7B8A3797073D96C360C281CD25D1534FDF8027E24E90695D653F40264E6FCAA5.pygtex