2

When I currently compile my LaTeX document, I do it like this:

sketch figures/torus.sketch > figures/torus.tex
pdflatex $(DOKUMENT).tex -output-format=pdf # aux-files for makeindex / makeglossaries
makeindex $(DOKUMENT)
pdflatex $(DOKUMENT).tex -output-format=pdf # include index
pdflatex $(DOKUMENT).tex -output-format=pdf # include symbol table
make clean # remove intermediate files like *.log and *.aux

This takes about 245 seconds (over 4 minutes).

But quite often, when I compile the document the first time after many changes, it has some errors, e.g.

  • forgetting about LaTeX issues with # and _
  • forgetting curly braces { or }
  • confusing input{figures/somefile.tex} with \includegraphics{figures/somefile.png}
  • forgetting to include packages

It would really be awesome if there was a fast LaTeX syntax checker. I would let the syntax checker run before the rest. If it fails, the rest will not be executed (as I do it with a Makefile, make will stop when the first error occurs). Does a LaTeX syntax checker exist? (False-negatives are ok, but there should not be any false-positives).

16
  • 2
    Does pdflatex -draftmode do what you want? It cuts away the output phase, but does all the rest.
    – egreg
    Commented Feb 9, 2014 at 11:52
  • 1
    Does tex.stackexchange.com/q/53771/15925 answer your question? Commented Feb 9, 2014 at 11:59
  • 1
    Maybe pdflatex -halt-on-error or -interaction=errorstopmode.
    – Sigur
    Commented Feb 9, 2014 at 11:59
  • 1
    I was thinking mostly of the syntonly package mentioned in at least one solution there. Commented Feb 9, 2014 at 12:03
  • 1
    Four minutes?! How long is your document?
    – jub0bs
    Commented Feb 9, 2014 at 12:23

0

Browse other questions tagged .