LaTex常见错误对照表及原因解析

原文链接:http://www.cs.utexas.edu/~witchel/errorclasses.html



Latex Error Classes

Ambiguous Errors模糊错误

This is a list of error classes with ambiguos error messages. Here either the errors are have different causes and the message output is same or else the errors have the same root cause but the messages are different.

S.NoClassError MessageCause of Error
1e_des! LaTeX Error: There's no line here to endUsage of \\ at the end of a long label in 'description' environment
2e_center! LaTeX Error: There's no line here to endUsage of \\ after the heading line in 'center' environment
3e_foot ! Argument of \@sect has an extra }Usage of a fragile command 'footnote' within \section
4e_ragged ! Argument of \@caption has an extra }Usage of \\ within \raggedright or \raggedleft environment
5e_and ! Extra alignment tab has been changed to \crToo many &s in a row of a table or array or eqnarray.
6e_cline ! Extra alignment tab has been changed to \crReference no non existing column in \cline
7e_col ! Extra alignment tab has been changed to \cr.Usage @ in tabular* environment
8e_num ! Missing number treated as zeroUsage of non numeric parameter after \\
9e_asteriskMissing * at the end of the line* is not printed when used without brace after \\
10e_pbox_miss ! Missing number, treated as zero.\parbox[t]{} ..Missing argument to parbox
11e_mis_circle ! Missing number, treated as zero.Missing numeric parameter to \circle
12e_list ! Argument of \lst@next has an extra }Usage of 1stlisting inside fragile command \parbox
13e_capacity ! TeX capacity exceeded, sorry [input stack size=1500]Usage of 1stlisting inside fragile command \parbox
14e_runawayRunaway argument?Generally because of missing braces, e.g \cline{1-2 instead of \cline{1-2}
15e_verbatimRunaway argument?Usage of verbatim within scope of another command e.g: \ifthenelse
16e_undefined! Undefined control sequenceUsage of an unknown command
17e_footnote! Undefined control sequenceUsage of \footnote within \footnote
18e_integral ! Missing { inserted.Integral bounds are malformed
19e_zeta ! Missing { inserted.Extra subscript before integral upper limit term
20e_bezier ! Illegal unit of measure (pt inserted).Missing numeric argument to \qbezier
21e_too_bezier ! Illegal unit of measure (pt inserted).Too many arguments to \qbezier
22e_unit ! Illegal unit of measure (pt inserted)\parbox[t]{2} ..Illegal unit of second parameter
23e_symfoot ! LaTeX Error: Counter too large.More than 9 footnotes when using symbolic footnotes
24e_large_count ! LaTeX Error: Counter too large.Trying to display a corresponding letter for a counter vallue >26
25e_begin! LaTeX Error: Missing \begin{document}Either text has been placed before \begin{document} or \begin{document} is missing
26e_margin ! LaTeX Error: Missing \begin{document}.Misuse of \marginsize

Common Errors

S.NoClassError MessageCause of Error
1e_fileEnd! File ended while scanning use of \end.Generally caused because of missing a brace
2e_endNo message only an asterisk, i.e *Missing \end{document}
3e_illegalLaTeX Error: Illegal character in array argUsage of a letter other than r,l and c in tabular environment
4e_tab! Misplaced alignment tab character &Missing \begin{tabular} while using tabular environment
5e_backslash! Missing \endcsname insertedUsage of a backslash in front of the name of an environment, e.g \begin{\itemize}
6e_delimiter! LaTeX Error: Bad math environment delimiterMissing \right immediately after the array environment
7e_right! Extra \right\right has no matching \left OR \end{array} is missing
8e_package! LaTeX Error: Can only be used in preambleUsage of \usepackage outside the preamble
9e_math! Missing $ insertedMissing a starting or ending $ in Math mode, e.g m_e instead of $m_e$
10e_parameter! Illegal parameter number in definition of...Usage of parameter number greater than the number of parameters defined in \newcommand, e.g \newcommand{\test}[1]{#3}
11e_cmd! LaTeX Error: Command ... already definedTrying to define already existing command, e.g \newcommand{\time}
12e_caption ! LaTeX Error: \caption outside float\caption{...} used outside table environment
13e_braces ! Too many }'sMissing \begin{table}statement
14e_parbox ! Argument of \@caption has an extra }Usage of \parbox in a \caption
15e_item ! LaTeX Error: Something's wrong--perhaps a missing \itemMissing \item within enumerate environment
16e_fraction ! Argument of \end has an extra }Misuse of fraction cmd e.g \frac{1,2}
17e_verb ! LaTeX Error: \verb ended by end of lineNewline after \verb, e.g. \verb*dir*
18e_invalid ! LaTeX Error: Command \end{itemize} invalid in math modeMissing $ while using math mode in \itemize
19e_equation ! Display math should end with $$Usage of $$ inside equation mode
20e_column ! Misplaced \omitUsage of \newcommand and \multicolumn within tabular environment
21e_subscript ! Double subscript.Usage of double subscript
22e_cls ! LaTeX Error: File `artcle.cls' not found.Missing .sty or .cls file
23e_nofile ! LaTeX Error: File `file1.tex' not found.Missing file1.tex, e.g. \input{file1.tex}
24e_sty ! LaTeX Error: File `anysize1.sty' not foundUse of unavailable package
25e_doc_class ! LaTeX Error: Can be used only in preamble.Usage of \documentclass outside preamble
26e_circle ! LaTeX Error: Command \circle invalid in math mode.Usage of \circle in math mode
27e_picture ! Use of \pictur@ doesn't match its definition.Bad parameter to \picture
28e_line ! Use of \put dosen't match its definitionBadly formatted \line directive
29e_line_arg ! LaTeX Error: Bad \line or \vector argument.Bad \line parameter
30e_counter ! LaTeX Error: No counter '10' defined.Counter undefined
31e_outer ! LaTeX Error: Not in outer par mode.Using figure inside parbox
32e_minipage ! LaTeX Error: Not in outer par mode.Using figure minipage
33e_lost ! LaTeX Error: Float(s) lost.Counter undefined
34e_lonely ! LaTeX Error: Lonely \item--perhaps a missing list environment.Usage of \item outside list environment
35e_parg ! LaTeX Error: Missing p-arg in array arg.Missing p argument in tabular environment
36e_hash ! You can't use `macro parameter character #' in vertical mode.Usage of # in normal mode
37e_enlarge ! LaTeX Error: Suggested extra height (14454.0pt) dangerously large.Too big a number given in \enlargethispage
38e_deftab ! LaTeX Error: Undefined tab position.Undefined tabbing
39e_pushtab ! LaTeX Error: \pushtabs and \poptabs don't match.Unequal numbers of push and pop tabs
40e_overtab ! LaTeX Error: Tab overflow.Too many \= in tabbing environment
41e_nest ! LaTeX Error: Too deeply nested.Too many list environments
42e_eqnarray ! LaTeX Error: Too many columns in eqnarray environment.More than three columns in eqnarray
43e_classpkg ! LaTeX Error: \usepackage before \documentclass.Usage of usepackage before loading documentclass
44e_load ! LaTeX Error: Two \LoadClass commands.More than one load class command
45e_require ! LaTeX Error: \RequirePackage or \LoadClass in Options Section.RequirePackage may not be used with \DeclareOption
46e_twoclass ! LaTeX Error: Two \documentclass or \documentstyle commands.More than one documentclass declaration
47e_font ! LaTeX Error: This NFSS system isn't set up properly.Invalid font used in \DeclareErrorFont
48e_superscript ! Double superscript.Usage of two superscripts for the same variable, e.g. 2^3^4
49e_clash_opt ! LaTeX Error: Option clash for package csvtools.Clashing options for the same package
50e_unknown_opt ! LaTeX Error: Unknown option ... for package ...Unkown option for a package
51e_hyphenation ! Improper \hyphenation will be flushed.Improper parameter to \hyphenation
52e_stack_size ! TeX capacity exceeded, sorry [main memory size=1000000]Overflow of buffer due to mistake in command definition
53e_environment ! LaTeX Error: Environment ... undefined.Undefined environment
54e_midline ! LaTeX Error: \< in mid lineCommand \< may appear only at the beginning of a line
55e_infiniteGoes into infinite loopUsage of \\strut\hrule


http://www.cs.utexas.edu/~witchel/errorclasses.html
### 回答1: 这是一个 LaTeX 错误提示,意思是“缺少 \endcsname 命令”。通常是由于在定义命令或环境时,使用了不合法的命名字符或符号,导致 LaTeX 无法正确解析。需要检查代码中的命名是否符合规范,并进行修正。 ### 回答2: "missing \endcsname inserted" 的意思是在 LaTeX 中找不到 \endcsname 指令,通常是由于在代码中使用了无效或不合法的命令或参数,导致编译器无法正确识别和解析代码,从而出现错误。 这个错误通常会在命令或环境名称中出现特殊字符或符号时出现,例如在定义新的命令或环境时,名称中包含了一些特殊的符号,如空格、下划线或其他非法字符。这些符号会导致编译器不知道如何正确处理这个命令或环境,并因此报出错误。 另外,这个错误还可能出现在宏包调用或加载时,如果指定的宏包名称中包含了非法字符,也可能会导致这个错误出现。 如果遇到这个错误,一般需要检查代码中是否有名称中包含非法字符的命令、环境或宏包,并进行修改或删除。同时,也要检查代码中的语法错误、拼写错误等其它可能导致编译器无法正常工作的问题,并进行修正。 总之,在使用 LaTeX 进行文档编写时,需要仔细检查代码,遵守 LaTeX 的代码规范,避免出现各种语法错误或命名错误,从而有效避免不必要的错误和麻烦。 ### 回答3: missing \endcsname inserted.是TeX编译时常见错误,默认情况下,TeX在编译时需要遵守一系列的规则,其中一个重要的规则就是所有的命令必须有一个合适的结束符号,例如“{”和“}”,否则就会出现missing \endcsname inserted.的错误。 这个错误通常出现在命令或环境中包含了无效的命令或符号,导致TeX无法正确结束命令或环境。例如,在一个标题中使用了特殊字符如“#”等,这些字符在TeX中有特殊意义,会导致编译器无法识别,从而出现错误。 解决missing \endcsname inserted.的错误的方法有点须得根据实际情况而定。首先,建议检查前一行代码是否已经正确结束,例如,前面是否有缺少闭合符号的命令;其次,查看错误信息提示所涉及到的命令或环境,找出其中的错误原因;最后,如果仍然无法解决错误,可以查阅相关文献或者在TeX社区中寻求帮助。 另外,为了避免类似的错误,在TeX编辑时,可以编写代码的同时,避免在命令或环境中使用无效的符号或者其他特殊字符,并在命令和环境的内部嵌套使用符号时,要保证每一个命令和环境都有正确的结束符号,这样可以避免出现missing \endcsname inserted.等错误
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值