To locate the source of such problems, I export the file to latex and manually compile it to latex in a terminal (or command window in Windows). The compilation will give you a line number. You can open the latex file in a simple text editor and go to the line to have an idea of the part of the document that poses problem.
-- Murat Yildizoglu yi...@u-bordeaux4.fr Le 6 janv. 2012 à 03:07, "David L. Johnson" <david.john...@lehigh.edu> a écrit : > On 01/05/2012 06:43 PM, Gerry Clare wrote: >> I am a fairly new LyX user. I recently edited a chapter (Document class >> 'report') that I had previously had no trouble compiling. I now get the >> following errors: >> >> ! Missing $ inserted. >> ! Extra }, or forgotten $. >> ! LaTeX Error: Command \item invalid in math mode. >> ! LaTeX Error: Something's wrong--perhaps a missing \item. >> ! Extra }, or forgotten \endgroup. >> > > Many of these sorts of errors occur because of a mistaken environment > setting. For example, if you accidentally have a whole bunch of stuff > included in a "heading" type environment, it can mess things up badly. Of > course, if you have some ERT included, you might have a problem there, too. > LyX is really quite good at writing tex that actually compiles, so if it > doesn't, there is usually some sort of unnoticed mistake somewhere. > > The previous suggestion is a good one, though. Break the file up (after > saving it) into pieces to see in which piece the problem lies. If you still > can't isolate it, put the smallest bad chunk of the document on the list, and > I'll take a look at it. > > -- > > David L. Johnson > > The lottery is a tax on those who fail to understand mathematics. >