On Tue, 18 Dec 2012 10:22:17 +0100
Rainer M Krug <r.m.k...@gmail.com> wrote:

> On 18/12/12 00:01, Nico Williams wrote:
> > On Mon, Dec 17, 2012 at 3:15 PM, Alex Vergara Gil
> > <a...@cphr.edu.cu> wrote:
> >> 
> >>> On Mon, Dec 17, 2012 at 2:25 PM, Richard Heck <rgh...@lyx.org>
> >>> wrote:
> >>>> 
> >>>> I'm not so sure. If someone were to write a converter that
> >>>> mapped LyX's XML onto ODT's, or whatever, then yes. But that
> >>>> would still need doing.
> >>> 
> >>> 
> >>> Yes, of course.  However, I think it should be easier to write
> >>> such XSLs to map from a straightforward LyX XML schema than from
> >>> LyXHTML output.  The latter depends too much on the document
> >>> class and has issues, while the former should preserve everything
> >>> about the original .lyx as much as possible.
> >>> 
> >>> Nico --
> >>> 
> >> And it would be easier for the final user the fact that all
> >> converters can operate automatically inside the LyX, instead of
> >> calling them, so you would see that copying a MathML equation in
> >> LOWriter and then pasting in LyX would result in a LyX equation
> >> where you insert them instead of having to convert it to latex
> >> using whatever script you have and the copy paste inside an
> >> equation box (is there an easier way right now? I think my way is
> >> too much omplicated), the same for figures (you don't need to save
> >> the image and then load it from LyX, just paste it where you want
> >> it) and tables (I think this is a lot more complicated example,
> >> but there is XLST converter).
> > 
> > Conversion at the File->Import... and File->Export... level would
> > be just a matter of writing the necessary XSLs.
> > 
> > Conversion at the cut-n-paste level is not something I can speak to
> > with confidence at this time.  I'll note only that if the content
> > being pasted is known to be XML in some schema then LyX could
> > invoke an XSL to convert it to .lyx.
> 
> This all sounds very exciting and extremely useful for import /
> export / collaboration, but there is one aspect which I would be
> missing in an XML file: At the moment, I can open a .lyx file with
> emacs and do change / replace in the .lyx file, when e.g. I have
> moved my images around. Or changing anything formating consistently
> throughout the text - this is much more time consuming in LyX itself.
> So my question: would this new XML format mean the "good bye" to the
> plain text format of the .lyx file, or would the XML be a new
> parallel, fully (and I mean fully!) equivalent and exchangeable
> format in LyX? I know that an XML is also a text file, but at least
> the ones I looked into were not nearly as editable as the .lyx plain
> text?

My impression was that Nico was making a converter to convert LyX
native format to XML, *for export*. If anybody is making LyX format any
more XML than it already is, I object strenuously for the exact reason
you stated --- I like working on and diagnosing LyX files in Vim. In
the twelve years I've used LyX, its native format has constantly become
harder for a human to deal with.

XML itself is incredibly human-hostile, but its misuse by developers is
astounding. Look at the XML for an OpenOffice file as an example.
Probably six different files, with all sorts of redundant information
scattered within those files. If you change something in one file
without changing its count in another, it simply breaks the file.

I don't care about OpenOffice because I use it for quick and dirty two
page documents, but I use LyX to write 300 page books, and I'd be
really bent out of shape if one day one of those books broke for
whatever reason (and it's happened before), and I couldn't put it back
together with Vim (which I've always been able to do up to now).

Then there's the fact that some of us tweak our Lyx files with a Perl,
Python, Ruby or Lua script before actually compiling it. This was easy
as pie in the pre-xml days, it's still doable because the developers
made their XML conform to certain line conventions (which is totally
beyond the definition of XML), but if LyX really goes gung-hoe with
XML, with all structure defined only by start and end tag, and maybe
multiple files, and perhaps just for fun the paragraphs in one file and
the *number of paragraphs* in another and if they don't match the file
won't read into LyX, well, I might be forced to move on.

SteveT

Reply via email to