LaTex常见的错误类型

错误信息可能来自于基本的 T e x Tex Tex,也可能来自于 L a T e x LaTex LaTex的格式或者具体的宏包。


1. T e x Tex Tex错误

首先是 T e x Tex Tex引擎给出的错误,这类错误通常以!开头,后面是错误信息的描述。

错误类型错误说明
!Undefined control sequence.控制序列(宏)没有定义。
错误原因:拼写错误、忘记引用宏包,命令名字错误。
!Missing { inserted.
!Missing } inserted.
T e x Tex Tex发现缺少某个分组的花括号。
! Too many }’s T e x Tex Tex发现多写了一个花括号。
! Missing $ inserted.缺少数学环境或数学环境专用命令用在了普通文本模式。
! Extra },or forgotten $.数学环境中分组的花括号或者左右定界符没有匹配。
! Double subscript.公式中使用了双下标,例如x_a_b。这会产生歧义,正确的写法应该为:x_{a_b}。
! Double superscript.公式中使用了双上标,与双下标一样会产生歧义。
!Extra alignment tab character &.使用&分隔的列太多超过了设定的列格式,或者是由于漏掉了表格行末尾的\\。
! Misplaced alignment tab character &.表格分隔符&只能用在矩阵或者表格中,用在普通文本中会出错。如果想输出&符号,请使用&。
! You can’t use 'macro parameter character #’ in… mode.f符号#只能表示命令定义中的参数,使用在普通文本中会报错。如果想输出#符号,请使用#。
! Illegal unit of measure (pt inserted).数量单位错误。在一些命令参数中需要带有有长度单位的数字,如果数字后缺少单位或者单位用错,就会产生这个错误。
! Missing number,treated as zero.缺少数字,假定为0。
! Illegal parameter number in definition of …定义命令时参数数量不正确。
! Missing control sequence inserted.在定义命令、长度或盒子时,没有使用命令名,产生错误。
! Use of … doesn’t match its definition.命令···的使用不符合定义。
! I can’t find file ‘…’. T e x Tex Tex找不到文件。一般会在 L a t e x Latex Latex错误的形式出现。
! Tex capacity exceeded,sorry […].文档的处理超过了 T e x Tex Tex的限制。大部分情况是由于错误的宏定义,例如使用无穷递归的定义。

2. L a t e x Latex Latex错误

L a t e x Latex Latex错误一般以!Latex Error:的字样开头,这样可以与 T e x Tex Tex或具体宏包的错误进行区别。

错误类型错误说明
Bad math environment delimiter.使用 l a t e x latex latex数学命令()或[\]出错。可能是因为已经在数学环境中了,或者数学环境左右不匹配。
\begin {…} on input line … ended by \end{…}.环境的首尾不匹配。
Can be used only in preamble.有些 L a t e x Latex Latex命令只能用于导言区。
Command … already defined.命令重复定义。
Counter too large.计数器值过大溢出。
Environment … undefined. L a t e x Latex Latex环境未定义。也可能是由于拼写错误或者没有使用宏包。
File … not found.文件未找到。通常是由于简单的拼写错误造成的。
Illegal character in array arg.在tabular或array环境中使用了错误的列格式说明符。
\include cannot be nested.命令\include不能嵌套使用。
Missing \begin{document}.文档缺少document环境。
Missing p-arg in array arg.在tabular或者array环境中的列格式说明符p缺少宽度参数。
Missing @-exp in array arg.在tabular或者array环境中的列格式说明符@缺少参数。
No counter ‘…’ defined.计数器未定义。可能是由于拼写错误造成的。
No \title given.文档缺少\title定义标题,这个错误只在使用 \maketitle 时才会发生。
There’s no line here to end.通常是由多余的\\或者\newline命令造成的。
Too deeply nested.列表环境嵌套过深。
Too many unprocessed floats.未处理的浮动体过多。
Undefined color ‘…’.使用color或者xcolor宏包以颜色名称调用颜色时,遇到颜色未定义的问题。
Undefined color model ‘…’.使用color或者xcolor宏包时,使用了未定义的颜色模型。
Unknown option … for …使用了未知的宏包选项。
\verb ended by end of line.\verb命令未完成。
Unknown graphics extention …使用graphicx宏包插图时,使用未知的图形扩展名。一般是使用了不支持的图形格式造成的。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

王贝贝的爸爸

觉得有用给点鼓励吧,求求你了

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值