Faster LaTeX part III: Check syntax only

This is the third post in a series on how to speed up the process of ‘LaTeXing’. Part 1 was on how to make the LaTeX compilation process faster by compiling only parts of large documents and in part 2 I wrote about an external TikZ library. Today’s post is a little different. Mostly, the reason I compile my document is to check if I made no syntax errors (misspelled commands, etc.). To check this, there is no need to compile the complete document. I’m talking about the \syntaxonly command!

Syntax checking

Checking the syntax only can be done with the syntonly package. This little package provides only the command \syntaxonly and is so small that it doesn’t even have a documentation! Add the following to your preamble:


Compiling the document

Of course, you sometimes need to compile the complete document. To do this, simply comment the \syntaxonly command:


That’s all!


  1. One more Thank you for this series!

    Another very powerful way to speed up the compilation of a TeX document (especially if its uses many or large packages) is to „precompile“ the præamble using mylatexformat, as described here at TeX.SX.

  2. Nice series! You could also deal with custom format files, like pre-compiled preambles. The mylatexformat package could be useful here.

  3. Herbert says:

    pdflatex -draftmode

    does nearly the same without using a package a_and_ with creating the help files.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>