When a tex file is compiled, everytime an error is detected, compilation stops and user action (usually hitting return key) is expected through console by user. I would like to ask, how is it possible to avoid this. I would like it not to stop on detected errors and finish with compilation of the tex file. Thanks in advance.
[Tex/LaTex] How to ignore latex error while compiling
What I would advise you is to use this;
-interaction nonstopmodeis equivalent to using
\nonstopmodein your document.
-halt-on-erroroption instructs the program to return a non-zero error code when an error is found. This is useful when you are e.g. calling latex from a script or from the
makeor an equivalent program like e.g.
sconsis highly recommended for larger documents that have an index or use citations. Because in those cases you will not only have to call LaTeX but also the programs to generate an index and bibliography.
-file-line-erroroption is makes it easier to locate errors in your source files, especially when you use
\includeto e.g. split up a long document into parts (like splitting a book into chapters and putting each chapter in a separate TeX file.
Here is a Makefile fragment that I use for big LaTeX documents;
The first line specifies that the commands have to be carried out when either the tex source document (the
TEXSRCvariable), the bibliography database (
lbref.bib) or the revision control status (
.git/index) has changed. The first two commands add the revision number to the document and add a list of changes. After that it calls
pdflatexa couple of times interspersed with calls to
bibtex. Several calls to LaTeX are generally necessary to resolve and stabilize all references when using
Edit: I've switched to using
latexmkbecause it will automatically take care of resolving cross-references, bibliographies and such.
So I've modified my Makefile:
I've switched to
xelatexfor its simpler font handling. All the output files are now put in a subfirectory as to not clutter the main directory and for easier cleaning. Only the resulting PDF file is moved to the main directory after it has been created.