On 7.12.07, Jean-Marc Lasgouttes wrote: > Richard Heck <[EMAIL PROTECTED]> writes: > > bigblop wrote: > >> > > Yes, that's right. What people call "round-trip" source view doesn't > > yet exist, though many people would like to see it.
> > We can import LaTeX using tex2lyx. But the problem is that, at the > > moment, tex2lyx isn't really integrated into LyX; it's a standalone > > utility. And even if it were integrated into LyX, tex2lyx isn't always > > terribly reliable. Those, as I understand things, are the main issues. Whether standalone script or not, does not necessarily matter. The problem is whether it is possible to have a loss-less lyx->latex->lyx conversion. Theory: is it possible to have a deterministic and loss-less round trip or will there always be some guessing and loss of information? Praxis: is it feasible to assume that latex export and import can be made so stable that repeated round-trips will never corrupt your document? > The main issue as I see it is that some people have the hope that writing > raw latex will allow them to get almost native support for things that > LyX does not support yet. I agree that latex source editing will not extend the set of things with native LyX support and can lead to increase of ERT at the expense of doing things "the LyX way". > I'd like to hear about reasonable use cases. Writing ERT in context: LaTeX gurus might add some special LaTeX formatting or commands requiring ERT spead at different places (e.g. a closing } somewhere after som non-ERT text. Doing this in a LaTeX-adapted text editor (with syntax highlight, auto indent and blinking of matching brackets) might facilitate this task. Opening the latex-source view while inserting ERT is an approximation to this experience of "best of two worlds". Advanced editing: * Search and replace in LyX objects (boxes), e.g. math, labels, box type, or filenames of included graphics. * Search and replace with regular expressions. Currently I work on the *.lyx source for this purposes. Editing the latex source has some advantages: * LaTeX source format is documented, LyX source format not. * LaTeX source is (IMO) better readable (designed for work on the source, while the LyX format is not meant to be seen directly by the user) * The LaTeX format is better known so the "only change this if you know what you are doing" threshold is lower. However, there are disadvantages: * Conversion from lyx to tex and back again takes time * and is not always stable nor sure to be loss-less (I acknowledge the vast improvements since the times of reLyX). Thanks Günter