Latex Common Errors

When you use TeXnicCenter, a separate window contains output from LaTeX concerning various compiling information, including errors. Much of this text can be ignored. However, if you see a symbol, you have a serious problem.

If you have a whole string of these error messages, scroll back until you hit the first one. Often one error will cause many others, so you should fix them starting with your first problem. Also, the output from the compiler will give you a line number to help you find the error in your code. In TeXnicCenter, the line number you are on is given at the bottom of the TeXnicCenter window on the right.


Here are some common error messages, as well as other possible problems, and a little information about what the problem usually is. Most of these error messages will appear right after the . Occasionally, they will appear 1-2 lines before it. A few of these are just warnings - they generate yellow triangles in TeXnicCenter when compiling.

  1. Extra alignment tab has been changed to /cr.
  2. LaTeX Error: /begin{something} on input line line number ended by /end{document}

Here are some problems that might occur that don't have error messages in the compiler:

If you have an error that's not on this list, post it on the message board and someone may be able to help.

Possible solutions to the errors above
  • Extra alignment tab has been changed to /cr.

    You have too many &s in a row of a table or array or eqnarray.

  • LaTeX Error: /begin{something} on input line line number ended by /end{document}

    You've left out the /end{whatever}. Perhaps you're building a table or an eqnarray that has a bunch of lines and you've forgotten the /end statement.

LaTeX Warning: Reference ... undefined on ...

You have references in your document. You need to compile again so LaTeX will be able to get the references right.


  • LaTeX Warning: There were undefined references.

    You have references in your document. You need to compile again so LaTeX will be able to get the references right.

  • Missing $ inserted

    You left out a $ or /[ or /] or $$ somewhere. when you were writing text that needs to be in math mode.

  • Paragraph ended before /end was complete.

    You are probably missing an } at the end of an /end{something} statement.

  • Runaway argument?

    A runaway argument occurs when you leave off a }.

  • Undefined control sequence.

    You've tried to call a command that doesn't exist. Usually this is the result of a typo. Go to the line number mentioned in the error and look at all your commands. You'll probably find something like /rfac where you wanted /frac.

  • Forget the error messages, when I try to compile, it starts, but then just hangs. Nothing happens, and I can't do anything. Then when I try to save the file, it won't let me save it with the same name.

    You probably have tried to us id="ctl00_ctl00_cphContent_cphDoc_EntryEditor1_richTextEditor_VisualEditor_DesignBox" class="designbox" src="about:blank" frameborder="0"> e a package that you haven't installed. For example, if you try /usepackage{fancyhdr} but haven't installed the package, then you'll hang TeXnicCenter so badly that you should just restart your computer (or, if you know how, kill the latex process you've started).

  • I'm trying to use fancyhdr to make headers and footers, but they don't align with the rest of my page. The rest of the page extends beyond the header line to the right or left.

    You probably have called /textwidth (or some other command dealing with page dimensions) after the /pagestyle command in your preamble. The /pagestyle and header and footer commands should come after all the page dimensions are set in the header.

  • I'm using referencing, but the page numbers or equation numbers aren't coming out right.

    You have references in your document. You need to compile again so LaTeX will be able to get the references right.
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值