The last step to complete a project is to find and resolve any errors! Some errors are easy to spot - they will stop a PDF being generated at all. Others are more subtle and may not be noticeable unless you read over your work to find missing symbols. Luckily, Overleaf flags all errors that it encounters, and provides detailed messages for many.
Flagged errors in Overleaf
Overleaf flags errors on the left-hand side of the source editor. Any line that contains an error is marked with a red x to the left of the line number.
Detailed error messages can be viewed by clicking the red button in the top right of the PDF preview pane, labeled with This project has an error.
For some errors, Overleaf adds "Learn More" link in the error message which goes to a page in their help documents.
Overleaf also offers a list of common errors at https://www.overleaf.com/learn/latex/Errors.
On this page we will go through a few common and easy to resolve errors. This will introduce you to the process of finding error information on Overleaf, and hopefully help you look out for these in your own projects.
For each of the following exercises, paste the given code into a project on Overleaf and try to compile. Read the error message in the logs, then resolve the error.
In this case, the error was a missing \right on the closing square bracket.
Overleaf gives the message "Missing \right. inserted."
With errors of this sort, Overleaf usually inserts what it thinks is the missing character in order to compile the document. The document will compile, but the right-hand bracket will not be resized.
In this case, the error was that the second \frac command is misspelled as \fac.
The corresponding error message is "Undefined control sequence."
The misspelling resulted in a “command” that Overleaf could not recognize. It still attempted to compile the document, and compiled the rest of the equation, with 3 and 2 as regular numbers rather than the numerator and denominator of a fraction.
The error here was that the parameter Conclusion closes with a square bracket instead of a curly brace.
In this case, Overleaf could not compile a PDF preview, and you saw the error logs instead of the preview.
The associated error message is "Runaway argument?," because the argument/parameter does not have a defined end.
This is an easy error to make, and miss, since the curly brace and square bracket are typically on the same keyboard key, and may appear similar at glance in a small font. Luckily, it is also an easy error to fix - just replace the bracket with a brace.
Congratulations! You have reached the end of the tutorial. The next page offers a final assessment to demonstrate what you've learned.