I have had the same problem before and it drove me insane until I found
a fix. The first thing to try is to View > dvi TWICE. The first time you
will get an error ( missing \begin{document} ) but I find that the
second time you View > dvi latex ignores the error and works the way it
should.
I think the error pops up when reading a document created with an
older version of LyX with a new version of LyX even though I can't
figure out why.
Chris
--
Hark! What rock through yonder window breaks?
Fran�ois Patte wrote:
>
> Sometimes (many times) I get the message: error when I want to see the
> dvi (or ps) file. When I try to see what is this error the answer:
> missing \begin{document}.
>
> What is the meaning of this message? What can I do if this kind of error
> is due to lyx and not to me? I'm not responsible for the preamble and if
> I try to add this latex command I get two error messages instead of one.
>
> Worse: in this case I can't do anything. I can't copy and paste from
> this lyx window to another lyx window (which, strangly, has no error
> message!), I can't export my text "as it is" to use latex to recover, I
> can't copy and paste to emacs. My work is lost!
>
> I run (french) version 1.0.3-1
>
> Thank you.
>
> -- Fran�ois Patte. UFR de math�matiques et informatique.
> 45 rue des St P�res. 75270 Paris Cedex 06
> Tel: 01 44 55 35 59 -- Fax: 01 44 55 35 35
> http://www.math-info.univ-paris5.fr/~patte