This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex 2018.11.28) 23 JAN 2020 14:45 entering extended mode restricted \write18 enabled. file:line:error style messages enabled. %&-line parsing enabled. **comandi_did (./comandi_did LaTeX2e <2018-04-01> patch level 2 Babel <3.18> and hyphenation patterns for 84 language(s) loaded. \c@teorema=\count80 ./comandi_did:39: LaTeX Error: No counter 'chapter' defined. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.39 \newtheorem{teorema}{Teorema}[chapter] ? ./comandi_did:39: Emergency stop. ... l.39 \newtheorem{teorema}{Teorema}[chapter] Your command was ignored. Type I to replace it with another command, or to continue without it. Here is how much of TeX's memory you used: 34 strings out of 492649 411 string characters out of 6129621 56400 words of memory out of 5000000 4016 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 8i,0n,14p,74b,14s stack positions out of 5000i,500n,10000p,200000b,80000s ./comandi_did:39: ==> Fatal error occurred, no output PDF file produced!