This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2017.8.31) 16 SEP 2018 14:18 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **preamble.tex (./preamble.tex LaTeX2e <2016/02/01> Babel <3.9q> and hyphenation patterns for 81 language(s) loaded. ! LaTeX Error: \usepackage before \documentclass. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.1 \usepackage[utf8]{ inputenc} \usepackage may only appear in the document preamble, i.e., between \documentclass and \begin{document}. ! LaTeX Error: \usepackage before \documentclass. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.2 \usepackage{ color} \usepackage may only appear in the document preamble, i.e., between \documentclass and \begin{document}. ! LaTeX Error: \usepackage before \documentclass. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.3 \usepackage{ amsmath} \usepackage may only appear in the document preamble, i.e., between \documentclass and \begin{document}. ! Undefined control sequence. l.5 \DeclareMathOperator *{\max}{max} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined. ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.5 \DeclareMathOperator* {\max}{max} You're in trouble here. Try typing <return> to proceed. If that doesn't work, type X <return> to quit. Missing character: There is no * in font nullfont! ! Missing $ inserted. <inserted text> $ l.5 \DeclareMathOperator*{\max }{max} I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed. LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line 5. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 5. ! Extra }, or forgotten $. l.5 \DeclareMathOperator*{\max} {max} I've deleted a group-closing symbol because it seems to be spurious, as in `$x}$'. But perhaps the } is legitimate and you forgot something else, as in `\hbox{$x}'. In such cases the way to recover is to insert both the forgotten and the deleted material, e.g., by typing `I$}'. ) ! Emergency stop. <*> preamble.tex *** (job aborted, no legal \end found) Here is how much of TeX's memory you used: 7 strings out of 493029 166 string characters out of 6136234 53072 words of memory out of 5000000 3643 multiletter control sequences out of 15000+600000 3640 words of font info for 14 fonts, out of 8000000 for 9000 1141 hyphenation exceptions out of 8191 19i,2n,12p,63b,58s stack positions out of 5000i,500n,10000p,200000b,80000s ! ==> Fatal error occurred, no output PDF file produced!