On Mon, May 24, 1999 at 09:25:26AM -0500, Chris Menzel wrote:
> Howdy.  reLyX is crashing on a LaTeX file of mine.  The problem appears
> to be in the TeX.pm perl module.  Sorry I can't be of any greater help.

Oh, but you can. See below.

Sorry in return that I took so long. I moved this week.

> offworld [~/Research/papers/aocpws] 
> 29: reLyX -d aocpws.tex 
> reLyX, the LaTeX to LyX translator. Revision date 1999/05/02

...

>  
> Cleaning TeX file (aocpws.relyx2 --> aocpws.relyx3)
> Expecting `$', got \end in `
> ' at /usr/local/bin/../share/lyx/reLyX/Text/TeX.pm line 397,
> <TeXOpenFile0002> chunk 1940.
> Can't locate object method "environment" via package
> "Text::TeX::Begin::Group" at
> /usr/local/bin/../share/lyx/reLyX/Text/TeX.pm line 400,
> <TeXOpenFile0002> chunk 1940.
> Exited due to fatal Error!

OK. The good news is that this shouldn't be too hard to diagnose, because
it's happening during the first pass over the file, where reLyX isn't doing
very much.

Usually, an error like this means you're doing fancy things that confuse the
(rather simple) tex parser. Things like fancy \newcommands. In thise case,
reLyX seems to think that you started an equation (with $) and didn't end
it. (It's dying on line 1940 of the file aocpws.relyx2, which is just
aocpws.tex with the preamble stripped. That might just be the end of the
document. Or the end of an enclosing environment of some sort.) The trick is
to find where the extra $ is.

To further diagnose the problem, try and cut out pieces of the file and see
if you still get crashing. Send me ([EMAIL PROTECTED]) the shortest file that
breaks. I will probably tell you that you need to put a skip block (see the
relyx man page) around some interesting expression in order to stop this
crash from happening.

Good luck.

-Amir Karger

Reply via email to