This is a list of most of the errors and warnings that are in Appendix B of The Latex Companionmittelbach2004, plus some more we encountered while error/warning hunting. For each error/warning, we give a minimal working example, and the relevant part of the output log. For more info on a message, see mittelbach2004. Used by us for testing purposes, written down here for future reference.
The logs here are when using -file-line-error flag when compiling.
./errors.tex:7: Package textcomp Error: Symbol \textuparrow not provided by
(textcomp) font family ppl in TS1 encoding.
(textcomp) Default family used instead.
\documentclass{article}
\usepackage[15]{fontenc}
\begin{document}
text
\end{document}
/home/abby/texlive/2019/texmf-dist/tex/latex/base/fontenc.sty:104: Package font
enc Error: Encoding file `15enc.def' not found.
(fontenc) You might have misspelt the name of the encoding.
/home/abby/texlive/2019/texmf-dist/tex/latex/base/fontenc.sty:105: LaTeX Error:
Encoding scheme `15' unknown.
./errors.tex:5: LaTeX Error: Encoding scheme `15' unknown.
! LaTeX Error: File `fakenews.tex' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)
Enter file name:
./main.tex:4: Emergency stop.
<read *>
l.4 \input{fakenews.tex}
./main.tex:4: ==> Fatal error occurred, no output PDF file produced!
kpathsea: Running mktextfm ecrm1000
/home/user/texlive/2019/texmf-dist/web2c/mktexnam: Could not map source abbreviation for ecrm1000.
/home/user/texlive/2019/texmf-dist/web2c/mktexnam: Need to update ?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ecrm1000
This is METAFONT, Version 2.7182818 (TeX Live 2019) (preloaded base=mf)
kpathsea: Running mktexmf ecrm1000
! I can't find file `ecrm1000'.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1000
Please type another input file name
! Emergency stop.
<*> ...ljfour; mag:=1; nonstopmode; input ecrm1000
Transcript written on mfput.log.
grep: ecrm1000.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ecrm1000' failed to make ecrm1000.tfm.
kpathsea: Appending font creation commands to missfont.log.
/home/user/texlive/2019/texmf-dist/tex/latex/base/fontenc.sty:105: Font T1/cm
r/m/n/10=ecrm1000 at 10.0pt not loadable: Metric (TFM) file not found.
<to be read again>
relax
l.105 \fontencoding\encodingdefault\selectfont
Font = not loaded: Not enough room left
Font shape not found
I can't find file `'
From the LaTeX Companion:
It seemed easier to reproduce using just TeX instead of LaTeX.
\input fake.tex
\bye
! I can't find file `fake.tex'.
l.1 \input fake.tex
I can't write on file `'
Make the main.aux file read only with chattr +i main.aux, then compile as usual.
./main.tex:3: I can't write on file `main.aux'.
\document ...ate \openout \@mainaux \jobname .aux
\immediate \write \@mainau...
l.3 \begin{document}
! Package amsmath Error: Improper argument for math accent:
(amsmath) Extra braces must be added to
(amsmath) prevent wrong output.
See the amsmath package documentation for explanation.
Type H <return> for immediate help.
...
l.415 \tilde k_{\lambda_j} = P_{\tilde \mathcal
{M}}
Improper discretionary list
\documentclass{article}
\discretionary
\begin{document}
hi
\end{document}
/home/abby/texlive/2019/texmf-dist/tex/generic/babel/babel.sty:554: Package bab
el Error: Unknown option `bla'. Either you misspelled it
(babel) or the language definition file bla.ldf was not found.
./errors.tex:4: LaTeX Error: Lonely \item--perhaps a missing list environment.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.4 \end
{document}
Math alphabet identifier is undefined in math version
./Untitled.tex:50: LaTeX Error: Math alphabet identifier \mathrm is undefined in math version `GFS'.
See the LaTeX manual or LaTeX Companion for explanation.
./errors.tex:2: LaTeX Error: Math version `GFS' is not defined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2 \mathversion{GFS}
./errors.tex:2: LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2 T
ext.
Missing control sequence inserted
\documentclass{article}
\newcommand t
\begin{document}
Text.
\end{document}
./errors.tex:3: Missing control sequence inserted.
<inserted text>
\inaccessible
l.3
No file main.aux.
./main.tex:5: Missing number, treated as zero.
<to be read again>
\let
l.5 \end{document}
Missing p-arg in array arg
Missing @-exp in array arg
Missing # inserted in alignment preamble.
\documentclass[11pt]{article}
\begin{document}
\begin{tabular}{p}
a
\end{tabular}
\end{document}
./main.tex:3: LaTeX Error: Missing p-arg in array arg.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.3 \begin{tabular}{p}
./main.tex:3: Missing # inserted in alignment preamble.
<to be read again>
\cr
l.3 \begin{tabular}{p}
Missing = inserted for \ifnum
Missing = inserted for \ifdim
./main.tex:4: Missing = inserted for \ifnum.
<to be read again>
\let
l.4 \end{document}
./main.tex:4: Missing = inserted for \ifnum.
<to be read again>
\let
l.4 \end{document}
./main.tex:7: Package amsmath Error: Multiple \label's: label '33' will be lost
.
See the amsmath package documentation for explanation.
Type H <return> for immediate help.
...
l.7 \end{align}
LaTeX Warning: Command \" invalid in math mode on input line 4.
./errors.tex:4: Please use \mathaccent for accents in math mode.
\add@accent ...@spacefactor \spacefactor }\accent
#1 #2\egroup \spacefactor ...
l.4 $ö
$
./errors.tex:4: You can't use `\spacefactor' in math mode.
\add@accent ...}\accent #1 #2\egroup \spacefactor
\accent@spacefactor
l.4 $ö
$
LaTeX Warning: File `included.tex' already exists on the system.
Not generating it from this source.
Float too large for page by
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\begin{center}
\includegraphics[width=\textwidth]{fig.pdf}
\caption[Short caption]{Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text Long text}
\end{center}
\end{figure}
\end{document}
LaTeX Warning: Float too large for page by 5.92273pt on input line 9.
LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <42> not available
(Font) size <24.88> substituted on input line 5.
LaTeX Font Warning: Size substitutions with differences
(Font) up to 17.12pt have occurred.
LaTeX Font Warning: Font shape `OT1/cmtt/b/n' undefined
(Font) using `OT1/cmtt/m/n' instead on input line 3.
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
amsmath: Foreign command ; \frac or \genfrac should be used instead
LaTeX Warning: Writing file `./filecontents.tex'.
LaTeX Warning: Writing text ` ' before \end{filecontents}
as last line of filecontents.tex on input line 5.
LaTeX Warning: Form Feed has been converted to Blank Line.
Overfull \hbox (252.50682pt too wide) in paragraph at lines 5--6
[][]
LaTeX Warning: Float too large for page by 295.04504pt on input line 6.
LaTeX Warning: `h' float specifier changed to `ht'.
LaTeX Warning: Label `mylabel' multiply defined.
LaTeX Warning: There were multiply-defined labels.
Label(s) may have changed. Rerun to get cross-references right
% https://tex.stackexchange.com/a/169245/98850
\documentclass{article}
\makeatletter
\begin{document}
\providecommand\r@foo{{1}{1}}
\edef\@currentlabel{.\expandafter\@firstoftwo\r@foo}
\label{foo}
a
\end{document}
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
Loose \hbox (badness )
% https://tex.stackexchange.com/q/496596/98850
\documentclass{article}
\begin{document}
\hbadness=-1 % to report the badness
\spaceskip.3333em \rightskip0pt plus20pt % allow only 20pt of stretchability
\def\text{The badness of this line is 1000.}
\setbox0=\hbox{\text}
\hsize=\wd0 \advance\hsize by 0.1pt \noindent\text\break
\end
Text.
\end{document}
Loose \hbox (badness 0) in paragraph at lines 9--12
\OT1/cmr/m/n/10 The badness of this line is 1000.
Package babel Warning: No hyphenation patterns were preloaded for
(babel) the language `German (trad. orthography)' into the forma
t.
(babel) Please, configure your TeX system to add them and
(babel) rebuild the format. Now I will use the patterns
(babel) preloaded for english instead on input line 58.
babel: No input encoding specified for language
% Install babel-russian
\documentclass[12pt]{article}
\usepackage[english,russian]{babel}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
\section{Здравствуйте}
Здравствуйте! Как у вас дела? Меня зовут Калеб. Как вас зовут?
\end{document}
Package babel Warning: No Cyrillic font encoding has been loaded so far.
(babel) A font encoding should be declared before babel.
(babel) Default `T2A' encoding will be loaded on input line 74.
No positions in optional float specifier. Default added ...
LaTeX Warning: Optional argument of \twocolumn too tall on page 1.
Overfull \vbox (30.0pt too high) has occurred while \output is active
LaTeX Warning: Text page 1 contains only floats.
LaTeX Warning: \oval, \circle, or \line size unavailable on input line 4.
Overfull \vbox (2.99998pt too high) detected at line 4
Overfull \vbox (2.99998pt too high) detected at line 4
Overfull \hbox (2.99998pt too wide) detected at line 4
Overfull \hbox (2.99998pt too wide) detected at line 4
\documentclass{article}
\hbadness=-1
\begin{document}
Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\end{document}
Tight \hbox (badness 0) in paragraph at lines 4--5
[]\OT1/cmr/m/n/10 Text text text text text text text text text text text text t
ext text text text
Tight \hbox (badness 3) in paragraph at lines 4--5
\OT1/cmr/m/n/10 text text text text text text text text text text text text tex
t text text text text
amsmath: Unable to redefine math accent
Underfull \hbox (badness ) detected at line
Underfull \hbox (badness ) has occurred while \output is active
Underfull \hbox (badness ) in alignment at lines
\documentclass{article}
\begin{document}
\begin{tabular*}{0.9\textwidth}{l}
\hline
Test \\
\hline
\end{tabular*}
\end{document}
Underfull \hbox (badness 10000) in alignment at lines 3--7
[]
l.3 \languageattribute{british}{test,test}
Package babel Warning: You have more than once selected the attribute 'test'
(babel) for language british. Reported on input line 3.
You have requested <name>', but the <package-or-class> provides '
(/home/thomas/GitRepos/random-tex/out/main.aux) )pdfTeX warning (dest): name{su
mmary} has been referenced but does not exist, replaced by a fixed one
</home/thomas/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on /home/thomas/GitRepos/random-tex/out/main.pdf (1 page, 12113
bytes).
BibTeX
Test file:
references.bib
@Book{knuth1990,
author = {Knuth, Donald E.},
title = {The {\TeX}book },
year = {1990},
isbn = {0-201-13447-0},
publisher = {Addison\,\textendash\,Wesley},
}
This is BibTeX, Version 0.99d (TeX Live 2020)
The top-level auxiliary file: bibtex-mwe.aux
I couldn't open database file references34.bib
---line 3 of file bibtex-mwe.aux
: \bibdata{references34
: }
I'm skipping whatever remains of this command
The style file: plain.bst
I found no database files---while reading file bibtex-mwe.aux
Warning--I didn't find a database entry for "knuth19902"
(There were 2 error messages)
Process finished with exit code 2
This database file appears more than once: references.bib
---line 3 of file bibtex-mwe.aux
: \bibdata{references,references
: }
I'm skipping whatever remains of this command
Case mismatch error between cite keys Knuth1990 and knuth1990
---line 3 of file bibtex-mwe.aux
: \citation{Knuth1990
: }
I'm skipping whatever remains of this command
The style file: plain.bst
I found no \bibdata command---while reading file bibtex-mwe.aux
Warning--I didn't find a database entry for "knuth1990"
(There was 1 error message)
article is already a type "wizard-defined" function name
---line 592 of file plainyr_my.bst
: function {article
: }
Database file #1: Publications.bib
(There was 1 error message)
The top-level auxiliary file: thesis_main.aux
The style file: utphys_custom_threeAuthors.bst
function is an unknown function---line 415 of file utphys_custom_threeAuthors.bst
format.authors is an unknown function---line 415 of file utphys_custom_threeAuthors.bst
Curse you, wizard, before you recurse me:
function format.names is illegal in its own definition
---line 418 of file utphys_custom_threeAuthors.bst
A bad cross reference--entry "" refers to entry "", which doesn't exist
@Book{knuth1990,
author = {Knuth, Donald E.},
title = {The {\TeX}book },
year = {1990},
isbn = {0-201-13447-0},
publisher = {Addison\,\textendash\,Wesley},
crossref = {nothing},
}
A bad cross reference---entry "knuth1990"
refers to entry "nothing", which doesn't exist
Warning--I didn't find a database entry for "nothing"
(There was 1 error message)
The literal stack isn't empty for entry
Too many commas in name
@Book{knuth1990,
author = {D.E. Knuth, D.E. Knuth, D.E. Knuth, D.E. Knuth, D.E. Knuth, D.E. Knuth, D.E. Knuth},
title = {The {\TeX} book },
year = {1990},
isbn = {0-201-13447-0},
publisher = {Addison\,\textendash\,Wesley},
}
Database file #1: references.bib
Too many commas in name 1 of "D.E. Knuth, D.E. Knuth, D.E. Knuth, D.E. Knuth, D.E. Knuth, D.E. Knuth, D.E. Knuth" for entry knuth1990
while executing---line 1049 of file plain.bst
Database file #1: references.bib
Warning--I didn't find a database entry for "knuth19902"
(There was 1 warning)
Process finished with exit code 0
I'm ignoring
@Book{knuth1990,
author = {Knuth, Donald E.},
author = {Knuth, Donald E.},
title = {The {\TeX}book },
year = {1990},
isbn = {0-201-13447-0},
publisher = {Addison\,\textendash\,Wesley},
}
Database file #1: references.bib
Warning--I'm ignoring knuth1990's extra "author" field
--line 5 of file references.bib
(There was 1 warning)
entry type for "" isn't style-file defined
@online{knuth1990,
author = {Knuth, Donald E.},
title = {The {\TeX}book },
year = {1990},
isbn = {0-201-13447-0},
publisher = {Addison\,\textendash\,Wesley},
}
Warning--entry type for "knuth1990" isn't style-file defined
--line 3 of file references.bib
You've nested cross references
@Book{knuth1990,
author = {Knuth, Donald E.},
title = {The {\TeX}book },
year = {1990},
isbn = {0-201-13447-0},
publisher = {Addison\,\textendash\,Wesley},
crossref = {greenwade1993},
}
@Article{greenwade1993,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351",
note = mytext,
crossref = {goossens1993},
}
Database file #1: references.bib
Warning--you've nested cross references--entry "knuth1990"
refers to entry "greenwade1993", which also refers to something
Warning--can't use both volume and number fields in knuth1990
(There were 2 warnings)
The style file: style.bst
Warning--I didn't find any fields--line 1 of file style.bst
(There was 1 warning)
string name "" is undefined
@Article{greenwade1993,
author = ``George D. Greenwade'',
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351",
note = mytext,
}
Database file #1: references.bib
Warning--string name "``george" is undefined
--line 12 of file references.bib
I was expecting a `,' or a `}'---line 12 of file references.bib
: author = ``george
: D. Greenwade'',
I'm skipping whatever remains of this entry
References
Frank Mittelbach, Michel Goossens, Johannes Braams, and Chris Rowley. 2004. The Latex Companion. 2nd ed. Boston: Addison-Wesley.
User’s Guide for the amsmath Package. http://mirrors.ctan.org/macros/latex/required/amsmath/amsldoc.pdf