Difference between revisions of "LaTeX:Help"
(→LaTeX Errors with Error Messages) |
(→Extra alignment tab has been changed) |
||
Line 27: | Line 27: | ||
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 red symbol. Occasionally, they will appear 1-2 lines before it. A few of these are just warnings - they generate yellow triangles in TeXnicCenter when compiling. | 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 red symbol. Occasionally, they will appear 1-2 lines before it. A few of these are just warnings - they generate yellow triangles in TeXnicCenter when compiling. | ||
− | ===Extra alignment tab has been changed=== | + | ===Extra alignment tab has been changed to \cr=== |
You have too many &s in a row of a table or array or eqnarray. | 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}=== | ===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. | 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. |
Revision as of 17:22, 13 July 2007
LaTeX |
About - Getting Started - Diagrams - Symbols - Downloads - Basics - Math - Examples - Pictures - Layout - Commands - Packages - Help |
This article will answer common LaTeX questions and provide solutions to common LaTeX problems. For more active help, please consult the AoPS message board.
Contents
[hide]- 1 Frequently Asked Questions
- 2 LaTeX Errors with Error Messages
- 2.1 Extra alignment tab has been changed to \cr
- 2.2 LaTeX Error: \begin{something} on input line line number ended by \end{document}
- 2.3 LaTeX Warning: Reference ... undefined on ....
- 2.4 LaTeX Warning: There were undefined references.
- 2.5 Missing $ inserted
- 2.6 Paragraph ended before \end was complete.
- 2.7 Runaway argument?
- 2.8 Undefined control sequence.
- 3 Other LaTeX Errors
- 3.1 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.
- 3.2 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.
- 3.3 I'm using referencing, but the page numbers or equation numbers aren't coming out right.
- 4 Helpful Links
- 5 See Also
Frequently Asked Questions
Here are commonly asked LaTeX questions and possible answers.
Installation
I'm using a Macintosh. What do I do?
Some Mac users use TeXShop, OzTeX or Textures (we wrote the Art of Problem Solving textbooks in 1993 using Textures). The TeXShop is free. (Special thanks to Community member nr1337 for letting us know about TeXShop.)
Why aren't there instructions for how to install on a Linux machine?
We figure that if you're computer-savvy enough to use a Linux machine in the first place, you can handle installing LaTeX on your own (with perhaps a little help from Google).
How can I install LaTeX on my website like you have on the TeXer and your message board?
We used LatexRender, which can be found here. You will need to be able to install LaTeX and imagemagick on your server to use this. That site also has a TeX Converter that doesn't require LaTeX and Imagemagick.
Coding Questions
My pages start too low!
Use \topmargin in the preamble as described here to set the top margin smaller.
LaTeX Errors with Error Messages
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 that looks like this:
Then 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 red symbol. Occasionally, they will appear 1-2 lines before it. A few of these are just warnings - they generate yellow triangles in TeXnicCenter when compiling.
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.
Other LaTeX Errors
Here are some problems that might occur that don't have error messages in the compiler. If your problem isn't solved by this page, consider posting on the AoPS message board for help.
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 use 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).
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.
Helpful Links
- Art of Problem Solving LaTeX forum - ask your question to our knowledgable LaTeX community.
- TeX Users Group home page - a source for all matters TeX.
- TeX Catalogue Online - a comprehensive database of LaTeX packages.
- MiKTeX home page - a popular TeX engine for Windows-based computers.
- TeXnicCenter home page - a popular TeX editor for Windows-based computers.
- MetaPost home page - MetaPost is a programming language for creating graphic images for inclusion into LaTeX documents. It is not easy to install or use but the quality of the images produced by MetaPost is outstanding. (All of the Art of Problem Solving's new Introductory textbooks used MetaPost to generate the diagrams.)