On Mon, Nov 03, 2003 at 01:29:58PM +0100, Georg Baum wrote: > Jean-Marc Lasgouttes wrote: > > > It looks good, except this bit that I do not like much: > > Me neither. But if the goal is real roundtrip support, something like this > is needed. The problem is that lyx generates a newline at some places (like > before \end{qoute} etc. that does not correspond to a space in the lyx > file. If the requirements on the roundtrip support are less strict, one can > ignore the "spaces may be removed" case, and this function will become much > simpler.
Maybe we must settle at a 'round trip' definition. There are several possibilities: 1. round trip in the weak sense: .lyx -> .tex -> .dvi == .lyx -> .tex -> .lyx -> .tex -> .dvi 2. round trip in the realistic sense: .lyx == .lyx -> .tex -> .lyx (mod irrelevant whitespace) 3. round trip in the strong sense: .lyx == .lyx -> .tex -> .lyx .tex == .tex -> .lyx -> .tex [...] I'd be more than happy to have 2. and I'd rather not add too much code to make the whitespace behave nicely as long as 1. is satisfied. If there is a possibility to stay 'white-space correct' without too much extra code, we can aim for white-space correctness, but this is a secondary goal. Andre'