Stefan Schimanski wrote: > > Am 08.06.2007 um 16:16 schrieb Dov Feldstern: > >> Stefan Schimanski wrote: >>> Ok, EPM is another issue, maybe even a matter of taste one could >>> enable/disable in the preferences. But first we should get this >>> into svn. José? Dov's patch has my OK. >> >> Great. Next (but the patch shouldn't wait for this!), we have to >> look into lyx2lyx for converting old files.
Is lyx2lyx support really needed? Or, in other words: Which patch changed the file format so that a lyx2lyx change is needed? I thought that all you did was to change how spaces are inserted during editing, and not how they are output to LaTeX. If that is not true then you created a big mess by committing the patch without lyx2lyx, and the patch causing the file format change should be reverted ASAP and resubmitted with a new file format number and lyx2lyx support in place. In any case you will destroy documents saved with a version of LyX between applying the patch and changing the file format (or reverting the patch), and since you can't change the past the only option to limit the number of documents saved this way is to revert to the old behaviour ASAP. >> I have no idea how >> lyx2lyx works, if anyone can give me pointers that would help. >> Like, do I have access to a buffer, similarly to the way it works >> when I'm working in the real document from with the LyX code? What >> we're going to have to do is find all occurrences of <RTL >> text><space, regardless of the language><LTR text> and vice versa, >> and make sure that the space's language is the same direction as >> that of the paragraph. How would I go about this? Why is that conversion needed? > So what we have to do is to move those spaces around. If we get this: > > \begin_layout Standard > abc > \lang hebrew > _FED > \lang english > _ghi > \end_layout > > from LyX 1.3, it in fact means: > > \begin_layout Standard > abc_ > \lang hebrew > FED > \lang english > _ghi > \end_layout > > So for 1.3 -> 1.5 we have to move the space just after a language > change into the previous section. For 1.5 -> 1.3 we also move the > spaces outside, but the one a the start of the line to the _next_ > section, and the one at the end to the previous one. > > For 1.4 I don't know. Have a look at normalize_font_whitespace() in lyx_1_5.py (the other direction is missing). Georg