6

I am working on my thesis and I was finishing it on latex. Until now everything was good. I had only 3 pages to do. But, suddenly the latex file gives me this problem emergency stop. And the latex produces 20 pages not 30 as I had before. I need help please, I am very desperate now. I cannot put the whole code because it says that I need at least 10 reputation to post more than 8 links.

! Emergency stop.
 main.tex
*** (job aborted, no legal \end found)
Here is how much of TeX's memory you used:
35363 strings out of 493005
703501 string characters out of 6134596
1299596 words of memory out of 5000000
38856 multiletter control sequences out of 15000+600000
58229 words of font info for 120 fonts, out of 8000000 for 9000
1348 hyphenation exceptions out of 8191
47i,20n,79p,10377b,3903s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on main.pdf (21 pages)

other problems it shows

! File ended while scanning use of \caption@ydblarg.

\par
l.382 \include{Chapters/Chapter5}
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.
\openout2 = `Appendices/AppendixA.aux'.
(./Appendices/AppendixA.tex
! LaTeX Error: Not in outer par mode.
See the LaTeX manual or LaTeX Companion for explanation.
Type H  for immediate help.
...
l.8 \begin{figure}[h]
You've lost some text. Try typing  to proceed.
If that doesn't work, type X  to quit.
File: Figures/plineappendix.png Graphic file (type QTm)

File: Figures/appendix2.png Graphic file (type QTm)

! LaTeX Error: Not in outer par mode.
See the LaTeX manual or LaTeX Companion for explanation.
Type H  for immediate help.
...
l.25 \begin{figure}[t!]
You've lost some text. Try typing  to proceed.
If that doesn't work, type X  to quit.
File: Figures/lorenz.pdf Graphic file (type QTm)

File: Figures/edu.png Graphic file (type QTm)

File: Figures/yline.pdf Graphic file (type QTm)
)
\openout2 = `Appendices/AppendixB.aux'.
(./Appendices/AppendixB.tex

I think it has a problem that regards the code \caption*. I put on the preamble a code about the caption and then suddenly everything collapsed. I removed the code and things didn't get back the same.

siracusa
  • 13,411
Lulo Malesori
  • 71
  • 1
  • 1
  • 6
  • 1
    You don't have \end{document}. – egreg Aug 04 '18 at 20:36
  • 1
    Yess, I have an \end{document}, thats a pretty strange thing – Lulo Malesori Aug 04 '18 at 20:41
  • 2
    Errors in the caption often wander in auxiliary files like the lof or aux or lot. Delete this files to get a fresh start. – Ulrike Fischer Aug 04 '18 at 20:44
  • how to get a fresh start, I have all what I have done there. I have to deliver the thesis after 3 days – Lulo Malesori Aug 04 '18 at 20:46
  • Don't panic, such errors happens. Small typos can have quite drastic error message. I get them too. Remove the auxiliary files, remove the code you think that triggered the problem and then compile anew. – Ulrike Fischer Aug 04 '18 at 20:50
  • my latex code is arranged as a (thesis), so I have a main.tex and then chapter.tex I deleted the aux and log for main. I didnt change – Lulo Malesori Aug 04 '18 at 20:50
  • Well captions are normally in the lof or the lot file, so delete them. – Ulrike Fischer Aug 04 '18 at 20:51
  • I deleted main.lof main.lot main.aux, and it doesnt change. please help me – Lulo Malesori Aug 04 '18 at 20:53
  • 7
    Move \end{document} directly behind a few word after \begin{document}. If this compiles move \end{document} down until you find the problem. – Ulrike Fischer Aug 04 '18 at 21:13
  • I dont think its possible to do that because the chapters are in different documents – Lulo Malesori Aug 05 '18 at 09:20
  • I tried to exclude chapter, I think the problem is in chapter 5. because everything is ok if chapter 5 is not included. The chapter five consists of two tables from estaout on Stata – Lulo Malesori Aug 05 '18 at 09:26
  • the error may be in an .aux file other than the main one. if there is more than one chapter file, check in your log to see what chapter the job was in when it stopped producing pages. then remove the .aux file for that chapter. – barbara beeton Aug 06 '18 at 14:37

1 Answers1

5

Maybe it is some missing } or a missing \end{figure} ?
If i delete \end{figure} from one of my figures i get kind of the same error.

You could try to build a regex to search for some missing elements in your code. Maybe with the help of the Regex \{\b.*\b {0,2}$ you can find your probably missing } or ) ?
I think there are better Regex for that task but you have nothing to loose.

Update 1 or if you have a strong regex engine like in Notepad++ or Visual Studio Code you can try: ^[^{}()\v]*[({][^{}()\v]*(\(([^()]*|(?1))\)|\{([^{}]*|(?1))\})*$

But i also recommend following @Ulrike Fischer suggestion to narrow down the area of failure if you get no clue from the log.

Update 2 After you found out your problem is somewhere in chapter 5 you can try to comment out % most (all) of your text in this chapter and than remove the % one after each other.

I can't comment (due to my reputation) so i will try to give an answer right away