Skip to content

There are a few tips and tricks that you can use to help identify and solve LaTeX problems. We generally recommend you debug with the Stop on First Error compilation mode turned on, as it will let you avoid error pileups. Once you’ve encountered an error, you can follow these steps to resolve it:

  1. Is there an error or warning?

    Start by looking at the "Logs and output files" icon, just to the right of the Recompile button.

    A warning indicator in the "Logs and output files" icon

    Warning messages are shown in orange. These are often just alerts that LaTeX has found something out of the ordinary and made automated adjustments. If they do not have an impact on the final look of your document, they can usually be ignored.

    For example, many float and margin/space issues are corrected by LaTeX with no need for user correction. Overleaf reports a special class of warning, underfull and overfull box warnings, in blue—most of these can be safely ignored, although they do sometimes highlight a part of your document that needs to be checked.

    An error indicator in the "Logs and output files" icon.

    Error messages are shown in red. They’re usually more problematic and can prevent the document from properly compiling. Fatal errors can prevent the document from compiling entirely.

    There is a list of common errors and how to resolve them here. We recommend that errors be corrected as soon as possible, as letting them accumulate may lead to hard-to-debug and fatal errors in future.

  2. Does the message indicate a specific error or line number?

    An error message with a line number included.

    In many cases, the LaTeX engine is smart enough to figure out the exact error and give you a line number. In the example above, there was a symbol _, which LaTeX requires you to escape like this: \_. The error message even indicates that the error is on line 29, highlights the appropriate line, and shows an excerpt of the text where the problem is located. You can click on the error message to jump directly to the file and line number where the error occurs in the source code.

    If no line number is indicated, continue trying some of the steps below.

  3. Does the error text provide a clue?

    An error message that indicates the problem is in the .bbl file, suggesting a problem with the bibliography.

    In the error message above, a line number is given, but not for a file that you are typically editing. Here, the file extension, .bbl, gives a clue that the error that’s preventing compilation is a BibTeX problem.

    Searching for the highlighted text in your .bib file will allow you to find the source of the error. Sometimes checking the auxiliary and log files may reveal more specific information than the briefer message dialogues.

  4. Compare previous versions and roll back changes

    If your project was compiling just fine previously, then you've likely introduced an error into the project in your recent edits. You can use the History feature to roll back recent changes.

  5. Try moving \end{document}

    If you still haven't narrowed down the location of the error, cut the \end{document} from the very end of your main .tex file and try pasting it in various parts of your project. Start with the main .tex file, and then, if necessary, any sub-files that you call in your main file with \input{} or \include{}. Move in a methodical fashion from the very end of the project/document toward the beginning of the document, repeating this process one section at a time. Pay particular attention to equations or other complicated sections prone to small errors.

    This should help you limit your document progressively to a smaller and smaller document until you can isolate the section containing the error. If the document suddenly begins compiling, you know you've located the erroneous section. In many cases, the problem could be something as simple as a mistyped command, an unescaped special character, or a missing bracket.

  6. Is it a compilation "timeout" error?

    In some cases, users may face timeout compilation errors under certain conditions. This is due to resource/compilation time limits on our servers. We have different time limits for free accounts and paid accounts. There are a number of tips we have in order to make your document compile faster, and if these don't work, feel free to contact us with a support request.

  7. Is it a “PDF rendering” error?

    As with other online services, you can sometimes run into problems when using Overleaf. Browser state, browser extensions, brief outages of service providers, and network configuration issues can potentially cause problems.

    If you’re experiencing connection issues, or if part of the editor or PDF viewer is not loading or displaying as expected, please try the troubleshooting steps on this page.

  8. Try the forums

    If no line number is given and you aren't able to decipher the given error message, a quick "copy-paste" trip to your favorite search engine may reveal information from expert users who have faced a similar issue. Some excellent TeX-related forums include LaTeX Stack Exchange and LaTeX Community.

  9. Contact us

    Last, but not least, you can always send us a support request. No matter your issue, whether LaTeX-specific, or site-specific, we're happy to help you get the most out of your Overleaf experience.

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX