>>Date: Tue, 06 Jul 2004 15:24:38 +0300 >>From: Robin Turner <[EMAIL PROTECTED]> >>To: [EMAIL PROTECTED] >>Cc: [EMAIL PROTECTED] >>Subject: Re: How to debug a lyx file: where the error is? >> >>[EMAIL PROTECTED] wrote: >>> Hello! >>> >>> May I ask you a question? >>> >>> I have a 40 pages document with 2 lyx errors in it. The lyx latex error notes appear at the very begining of the document they are: missing $ inserted and bad math environment delimiter. The first math formula appears many pages later and the error appeared during the time I was working on chapters in the middle of the document. So I do not understand where the errors could be. I tried to go to the tmpdir and to run pdflatex directly, but it was compiling fine, but the index of the resulting file had a strange line. So I checked it and found \( and \) in an index field I removed them and it is now compiling fine with lyx !! >>> >>> What bug fighting strategy do you recomend in this kind of case?
Split your doc in chapters, test your transparencies each in turn. If a subpart works alone, it will work as a whole. In contrast to LaTeX and the \includeonly facility, LyX offers a simple mechanism for chapter compilation: - define a documnet model - build each part alone with it - define a master document with the same model and include (as LyX) the chapters: LyX will ignore the preambles of the chapters. The only remaining problem is with the cross-references: you may insert them in ERT to remind you to set them in the last integration step. (AFAR, tehre are hints abou this in the doc). As a side remark, it's logical from the point of view of developers to fail to produce output until the document is bug-free: if there is no ERT at all (or preamble declarations, or local .tex inputs), the compilation should run without errors. >From the point of view of an user in a hurry to output a document due yesterday, Lyx could allow (as a preference setting) to produce output even in case of errors, to avoid exporting to latex to do so. Howver, it is possible to circumvent the error showstopper by compiling once with success (with a minimum errror-free document), and then only update: the dvi, ps or pdf produced must be updated in spite of errors. -- Jean-Pierre