I have a problem with compiling in latex. I was trying to write a matrix, when latex suddenly did not want to compile it anymore. I deleted everything new, but it still did not work. First it had some messages that had many "full box" warnings. I have had many of these before, but it was still working. Does anyone know what I can do to fix this?

  • 2
    Need a MWE which shows the problem. I suspect you have left a { without it matching }. Feb 26, 2015 at 18:09
  • Do you mean like this:Overfull \hbox (73.78595pt too wide) detected at line 280 [] [][] [][] []\OML/cmm/m/it/10 dud \OT1/cmr/m/n/10 = [][] [][] \OML/cmm/m/it/ 10 d \OT1/cmr/m/n/10 = [](\OMS/cmsy/m/n/10 ] [7] [8] [9] [10] ! LaTeX Error: Can be used only in preamble. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.835 \documentclass [reqno]{amsart} ?
    – David
    Feb 26, 2015 at 18:15
  • 1
    when latex stops compiling partway through a job, it's always a good idea to delete any "derived" files -- .aux, .toc, etc. -- so that they don't subvert your attempt to restart after removing what you know caused a problem in the earlier try. Feb 26, 2015 at 18:17
  • 1
    It would help to see the actual latex code. From your log snippet I suspect you have put something in the body of the code which can only be in the preamble. Feb 26, 2015 at 18:22
  • 4
    I'm voting to close this question as off-topic because it is about an error in the user's file
    – egreg
    Feb 26, 2015 at 20:30

1 Answer 1


On line 835 of your main file you have

\documentclass [reqno]{amsart} 

which is the start of a file.

I would guess you accidentally cut and pasted the entire document into itself.

  • You were right. I am not sure how it happened, but I must have somehow copied and pasted the entire document. I therefore deleted the things copied, and it now works perfectly again. Thank you.
    – David
    Feb 28, 2015 at 13:34

Not the answer you're looking for? Browse other questions tagged .