Re: Would a native LyX XML schema be accepted?

2012-12-19 Thread Rainer M Krug
On 19/12/12 06:57, Nico Williams wrote:
 On Tue, Dec 18, 2012 at 10:43 PM, Steve Litt sl...@troubleshooters.com 
 wrote:
 On Tue, 18 Dec 2012 10:22:17 +0100 Rainer M Krug r.m.k...@gmail.com wrote:
 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.
 
 That is what I'm doing, plus an XSL to produce .lyx from the XML.
 
 As for the editability of .lyx vs. XML... well, both are editable in $EDITOR. 
  And XML benefits
 from the ability to use XPath, XSL, ..., so that if you have such XML tools 
 at hand (and you
 would have to if LyX were to switch to a native XML format) then you'd have a 
 much easier time
 doing programmatic transformations outside LyX than you do with the current 
 .lyx format.
 
 Also, if LyX were to switch to a native XML format then my script and XSLs 
 could still be used
 to produce old-style .lyx for editing the way you want to.  Such tools would 
 still need to be
 supported for a long time for migration purposes.
 
 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.
 
 It's not XML that demands six files.

The question, if the XML representation of LyX can be edited, can only be 
answered when we can
take a look at the format and an example XML. But the point is:

1) Keep the native LyX format and implement the XML as an export / import 
format which is 100%
compatible, e.g. having an option (like the compressed setting) so that one 
can choose the XML
format as standard format?

or

2) if LyX is switching completely to the XML format, it *definitely needs to be 
easily editable*
with vim / emacs / $EDITOR

And even if most of us don't use MSWord / LibreOffice (actually would rather 
use emacs / vim /
$EDITOR then MS Word), it would be a very important feature, which has been 
discussed numerous
times, to have a out of the box export / import to docx files to make the 
switch to LyX easier
as well the co-operation with word users. This export / import only has to 
support a subset of
features, but if only these are used in the document, the round trip should be 
loss less (I know -
I'm dreaming).

Cheers,

Rainer


 
 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 [...]
 
 See above!
 
 Nico --
 



Re: Would a native LyX XML schema be accepted?

2012-12-19 Thread José Matos
On 12/19/2012 04:55 AM, Steve Litt wrote:
 I disagree. At least some of us are now discussing the possibility
 of formatting native LyX as standard XML, which, as I said in another
 post, is human hostile. Many, many of us interact with LyX files
 outside of the LyX executables or utilities.

 These users have an incredible interest in the native format of LyX.
 Don't think for a minute this is a developers only issue.

 What I find the biggest insult is the motivation for this possible
 disenfranchisement of LyX users dedicated enough to interact with LyX
 files in nonstandard ways. That motivation? To accommodate Word
 weenies. You've got to be kidding. Is this what free software has come
 to?

 Perhaps the most ironic thing is that if full XMLitization comes to
 pass, you know what I'll use Nico's XML converter for? To export my 7
 LyX-authored books to XML, from which I can convert them to plain-TeX.

 SteveT

If lyx changes to xml it will change to our xml defined format. We still
have control of what we output.

The argument regarding the readability of xml reminds of lots of code
that I see on blogs or any other pages. When I am reading code I expect
it to have a proper indentation, and if possible to be colored, with
enough white spaces and new lines so that the structure emerges just
from reading the code.

Just because some code is legal from a language perspective it does not
mean that we should use it.

The same should happen for the lyx file format. If we go xml I expect
that one of our goals is that output lyx file is friendly towards a line
oriented analysis, I expect that it remains easy for us to diff two lyx
files. The purpose of converting lyx to xml is to add other
conveniences. For example, now how do you decide that a lyx files is
well constructed? Is it to expect that it does not crash lyx? That a
roundtrip from loading and saving the file gives the same output?

Summarizing: if we go with xml the purpose is not to waste all the
knowledge that we had accumulated in the last 17 years but to build over it.

-- 
José Matos



Re: Would a native LyX XML schema be accepted?

2012-12-19 Thread Nico Williams
FWIW, I edit XML in vim plenty.  It's not awesome, but it's not
particularly painful either.  XML is not unfriendly to $EDITOR, but it
is more verbose.  The great value that XML provides is in technologies
like XPath, XQuery, and XSLT.  I ache for the power of XSLT in
association with LyX.

But also, even if LyX adopts a native XML format, the old .lyx format
will necessarily stick arou d for a long time due to the need to
support migration from one format to the other, so it should always be
possible to edit .lyx in $EDITOR for those who want it.  The .lyx
format can't be going away forever anytime soon!

Regarding collaborations...  there's an online, web-based,
collaborative LaTeX editor out there that is clearly superior to LyX
as far as collaborative editing goes.  It'd be nice if LyX could grow
some awesome collaborative functionality, and I think that XML
technologies can help there.

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-19 Thread Rainer M Krug
On 19/12/12 06:57, Nico Williams wrote:
 On Tue, Dec 18, 2012 at 10:43 PM, Steve Litt sl...@troubleshooters.com 
 wrote:
 On Tue, 18 Dec 2012 10:22:17 +0100 Rainer M Krug r.m.k...@gmail.com wrote:
 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.
 
 That is what I'm doing, plus an XSL to produce .lyx from the XML.
 
 As for the editability of .lyx vs. XML... well, both are editable in $EDITOR. 
  And XML benefits
 from the ability to use XPath, XSL, ..., so that if you have such XML tools 
 at hand (and you
 would have to if LyX were to switch to a native XML format) then you'd have a 
 much easier time
 doing programmatic transformations outside LyX than you do with the current 
 .lyx format.
 
 Also, if LyX were to switch to a native XML format then my script and XSLs 
 could still be used
 to produce old-style .lyx for editing the way you want to.  Such tools would 
 still need to be
 supported for a long time for migration purposes.
 
 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.
 
 It's not XML that demands six files.

The question, if the XML representation of LyX can be edited, can only be 
answered when we can
take a look at the format and an example XML. But the point is:

1) Keep the native LyX format and implement the XML as an export / import 
format which is 100%
compatible, e.g. having an option (like the compressed setting) so that one 
can choose the XML
format as standard format?

or

2) if LyX is switching completely to the XML format, it *definitely needs to be 
easily editable*
with vim / emacs / $EDITOR

And even if most of us don't use MSWord / LibreOffice (actually would rather 
use emacs / vim /
$EDITOR then MS Word), it would be a very important feature, which has been 
discussed numerous
times, to have a out of the box export / import to docx files to make the 
switch to LyX easier
as well the co-operation with word users. This export / import only has to 
support a subset of
features, but if only these are used in the document, the round trip should be 
loss less (I know -
I'm dreaming).

Cheers,

Rainer


 
 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 [...]
 
 See above!
 
 Nico --
 



Re: Would a native LyX XML schema be accepted?

2012-12-19 Thread José Matos
On 12/19/2012 04:55 AM, Steve Litt wrote:
 I disagree. At least some of us are now discussing the possibility
 of formatting native LyX as standard XML, which, as I said in another
 post, is human hostile. Many, many of us interact with LyX files
 outside of the LyX executables or utilities.

 These users have an incredible interest in the native format of LyX.
 Don't think for a minute this is a developers only issue.

 What I find the biggest insult is the motivation for this possible
 disenfranchisement of LyX users dedicated enough to interact with LyX
 files in nonstandard ways. That motivation? To accommodate Word
 weenies. You've got to be kidding. Is this what free software has come
 to?

 Perhaps the most ironic thing is that if full XMLitization comes to
 pass, you know what I'll use Nico's XML converter for? To export my 7
 LyX-authored books to XML, from which I can convert them to plain-TeX.

 SteveT

If lyx changes to xml it will change to our xml defined format. We still
have control of what we output.

The argument regarding the readability of xml reminds of lots of code
that I see on blogs or any other pages. When I am reading code I expect
it to have a proper indentation, and if possible to be colored, with
enough white spaces and new lines so that the structure emerges just
from reading the code.

Just because some code is legal from a language perspective it does not
mean that we should use it.

The same should happen for the lyx file format. If we go xml I expect
that one of our goals is that output lyx file is friendly towards a line
oriented analysis, I expect that it remains easy for us to diff two lyx
files. The purpose of converting lyx to xml is to add other
conveniences. For example, now how do you decide that a lyx files is
well constructed? Is it to expect that it does not crash lyx? That a
roundtrip from loading and saving the file gives the same output?

Summarizing: if we go with xml the purpose is not to waste all the
knowledge that we had accumulated in the last 17 years but to build over it.

-- 
José Matos



Re: Would a native LyX XML schema be accepted?

2012-12-19 Thread Nico Williams
FWIW, I edit XML in vim plenty.  It's not awesome, but it's not
particularly painful either.  XML is not unfriendly to $EDITOR, but it
is more verbose.  The great value that XML provides is in technologies
like XPath, XQuery, and XSLT.  I ache for the power of XSLT in
association with LyX.

But also, even if LyX adopts a native XML format, the old .lyx format
will necessarily stick arou d for a long time due to the need to
support migration from one format to the other, so it should always be
possible to edit .lyx in $EDITOR for those who want it.  The .lyx
format can't be going away forever anytime soon!

Regarding collaborations...  there's an online, web-based,
collaborative LaTeX editor out there that is clearly superior to LyX
as far as collaborative editing goes.  It'd be nice if LyX could grow
some awesome collaborative functionality, and I think that XML
technologies can help there.

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-19 Thread Rainer M Krug
On 19/12/12 06:57, Nico Williams wrote:
> On Tue, Dec 18, 2012 at 10:43 PM, Steve Litt  
> wrote:
>> On Tue, 18 Dec 2012 10:22:17 +0100 Rainer M Krug  wrote:
>>> 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.
> 
> That is what I'm doing, plus an XSL to produce .lyx from the XML.
> 
> As for the editability of .lyx vs. XML... well, both are editable in $EDITOR. 
>  And XML benefits
> from the ability to use XPath, XSL, ..., so that if you have such XML tools 
> at hand (and you
> would have to if LyX were to switch to a native XML format) then you'd have a 
> much easier time
> doing programmatic transformations outside LyX than you do with the current 
> .lyx format.
> 
> Also, if LyX were to switch to a native XML format then my script and XSLs 
> could still be used
> to produce old-style .lyx for editing the way you want to.  Such tools would 
> still need to be
> supported for a long time for migration purposes.
> 
>> 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.
> 
> It's not XML that demands "six files".

The question, if the XML representation of LyX can be edited, can only be 
answered when we can
take a look at the format and an example XML. But the point is:

1) Keep the native LyX format and implement the XML as an export / import 
format which is 100%
compatible, e.g. having an option (like the "compressed" setting) so that one 
can choose the XML
format as standard format?

or

2) if LyX is switching completely to the XML format, it *definitely needs to be 
easily editable*
with vim / emacs / $EDITOR

And even if most of us don't use MSWord / LibreOffice (actually would rather 
use emacs / vim /
$EDITOR then MS Word), it would be a very important feature, which has been 
discussed numerous
times, to have a "out of the box" export / import to docx files to make the 
switch to LyX easier
as well the co-operation with word users. This export / import only has to 
support a subset of
features, but if only these are used in the document, the round trip should be 
loss less (I know -
I'm dreaming).

Cheers,

Rainer


> 
>> 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 [...]
> 
> See above!
> 
> Nico --
> 



Re: Would a native LyX XML schema be accepted?

2012-12-19 Thread José Matos
On 12/19/2012 04:55 AM, Steve Litt wrote:
> I disagree. At least some of us are now discussing the possibility
> of formatting native LyX as standard XML, which, as I said in another
> post, is human hostile. Many, many of us interact with LyX files
> outside of the LyX executables or utilities.
>
> These users have an incredible interest in the native format of LyX.
> Don't think for a minute this is a developers only issue.
>
> What I find the biggest insult is the motivation for this possible
> disenfranchisement of LyX users dedicated enough to interact with LyX
> files in nonstandard ways. That motivation? To accommodate Word
> weenies. You've got to be kidding. Is this what free software has come
> to?
>
> Perhaps the most ironic thing is that if full XMLitization comes to
> pass, you know what I'll use Nico's XML converter for? To export my 7
> LyX-authored books to XML, from which I can convert them to plain-TeX.
>
> SteveT

If lyx changes to xml it will change to our xml defined format. We still
have control of what we output.

The argument regarding the readability of xml reminds of lots of code
that I see on blogs or any other pages. When I am reading code I expect
it to have a proper indentation, and if possible to be colored, with
enough white spaces and new lines so that the structure emerges just
from reading the code.

Just because some code is legal from a language perspective it does not
mean that we should use it.

The same should happen for the lyx file format. If we go xml I expect
that one of our goals is that output lyx file is friendly towards a line
oriented analysis, I expect that it remains easy for us to diff two lyx
files. The purpose of converting lyx to xml is to add other
conveniences. For example, now how do you decide that a lyx files is
well constructed? Is it to expect that it does not crash lyx? That a
roundtrip from loading and saving the file gives the same output?

Summarizing: if we go with xml the purpose is not to waste all the
knowledge that we had accumulated in the last 17 years but to build over it.

-- 
José Matos



Re: Would a native LyX XML schema be accepted?

2012-12-19 Thread Nico Williams
FWIW, I edit XML in vim plenty.  It's not awesome, but it's not
particularly painful either.  XML is not unfriendly to $EDITOR, but it
is more verbose.  The great value that XML provides is in technologies
like XPath, XQuery, and XSLT.  I ache for the power of XSLT in
association with LyX.

But also, even if LyX adopts a native XML format, the old .lyx format
will necessarily stick arou d for a long time due to the need to
support migration from one format to the other, so it should always be
possible to edit .lyx in $EDITOR for those who want it.  The .lyx
format can't be going away forever anytime soon!

Regarding collaborations...  there's an online, web-based,
collaborative LaTeX editor out there that is clearly superior to LyX
as far as collaborative editing goes.  It'd be nice if LyX could grow
some awesome collaborative functionality, and I think that XML
technologies can help there.

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
On 17/12/12 21:02, stefano franchi wrote:
 
 
 
 On Mon, Dec 17, 2012 at 1:47 PM, Richard Heck rgh...@lyx.org 
 mailto:rgh...@lyx.org wrote:
 
 On 12/17/2012 01:49 PM, Nico Williams wrote:
 
 On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck rgh...@lyx.org 
 mailto:rgh...@lyx.org wrote:
 
 On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:
 
 Meanwhile, the script I'm working on will effectively get us there, though in 
 a hackish way:
 externally, rather than by changing the C++ code.  But I think that's OK.  We 
 can make a lot of
 progress by first making sure there's a faithful XML representation of .lyx, 
 as that will allow
 all sorts of progress in terms of import/export conversions, and having such 
 an XML format to
 play with may help the team to think more about how to structure the C++ code.
 
 
 
 Sounds like a great idea. One question: would having an external but faithful 
 XML Lyx file
 allow XLS-translations to XML-based word-processing formats? That would solve 
 once and for all
 (hopefully) the problem of the Lyx--Word conversion that still plagues those 
 of us working in
 the Humanities (At least, it still affects me).

Not only Humanities - I am working in the field of Ecology, and nearly all 
co-authors use MS Word,
and most Journals hide their option of submitting LaTeX somewhere. So this 
would be brilliant.

Rainer

 
 
 Stefano
 
 
 -- __ Stefano Franchi 
 Associate Research
 Professor Department of Hispanic StudiesPh:   +1 (979) 845-2125 
 Texas AM
 University  Fax:  +1 (979) 845-6421 College Station, 
 Texas, USA
 
 stef...@tamu.edu mailto:stef...@tamu.edu http://stefano.cleinias.org



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
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?

Nevertheless, I think the XML format, keeping the import/export in mind, would 
be a huge step forward.

Cheers,

Rainer

 
 Nico --
 



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Jean-Marc Lasgouttes

Le 18/12/12 10:14, Rainer M Krug a écrit :

Sounds like a great idea. One question: would having an external but faithful 
XML Lyx file
allow XLS-translations to XML-based word-processing formats? That would solve 
once and for all
(hopefully) the problem of the Lyx--Word conversion that still plagues those 
of us working in
the Humanities (At least, it still affects me).


Not only Humanities - I am working in the field of Ecology, and nearly all 
co-authors use MS Word,
and most Journals hide their option of submitting LaTeX somewhere. So this 
would be brilliant.


Don't be lured by the fact that XML presents itself as the solution to 
all problems. I do not see how you could collaborate with co-authors 
using word, unless your document is horribly simple.


Today, although LyX format has been designed to follow LaTeX concepts, 
exchanging documents with latex users is not that simple. IMO sharing 
with word is not really going to work.


What could maybe be possible is to export to word and from there repair 
the file (or import and repair by hand).


JMarc


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
On 18/12/12 10:28, Jean-Marc Lasgouttes wrote:
 Le 18/12/12 10:14, Rainer M Krug a écrit :
 Sounds like a great idea. One question: would having an external but 
 faithful XML Lyx file 
 allow XLS-translations to XML-based word-processing formats? That would 
 solve once and for
 all (hopefully) the problem of the Lyx--Word conversion that still plagues 
 those of us
 working in the Humanities (At least, it still affects me).
 
 Not only Humanities - I am working in the field of Ecology, and nearly all 
 co-authors use MS
 Word, and most Journals hide their option of submitting LaTeX somewhere. So 
 this would be
 brilliant.
 
 Don't be lured by the fact that XML presents itself as the solution to all 
 problems. I do not
 see how you could collaborate with co-authors using word, unless your 
 document is horribly
 simple.

Obviously not lossless or that straight forward - but I guess much easier then 
it is now. (even
Libre Office an Word do not play that nicely together - even if I use only 
docx, I get formating
issues when I get the file back. But these are things I can handle.

And actually, most documents are horribly simple, and how it looks in word is 
irrelevant (no
painting of formats necessary), as long as the *structure* is kept. Even images 
/ tables could be
skipped in word, as long as a placeholder is put there (or an image).

Cheers,

Rainer

 
 Today, although LyX format has been designed to follow LaTeX concepts, 
 exchanging documents
 with latex users is not that simple. IMO sharing with word is not really 
 going to work.
 
 What could maybe be possible is to export to word and from there repair the 
 file (or import
 and repair by hand).
 
 JMarc
 



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Jean-Marc Lasgouttes

Le 18/12/12 10:39, Rainer M Krug a écrit :

Don't be lured by the fact that XML presents itself as the solution to all 
problems. I do not
see how you could collaborate with co-authors using word, unless your document 
is horribly
simple.


Obviously not lossless or that straight forward - but I guess much easier then 
it is now. (even
Libre Office an Word do not play that nicely together - even if I use only 
docx, I get formating
issues when I get the file back. But these are things I can handle.

And actually, most documents are horribly simple, and how it looks in word is 
irrelevant (no
painting of formats necessary), as long as the *structure* is kept. Even images 
/ tables could be
skipped in word, as long as a placeholder is put there (or an image).


You are in the category of users who know what to expect. I wanted to 
point out that in general, co-authors may not want to put up with 
collaborating on a document that has weird formatting (no image, bad 
tables...) just because you do not want to use word :)


And indeed, using libreoffice in a team of word aficionados is already 
painful IMO.


JMarc


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
On 18/12/12 10:57, Jean-Marc Lasgouttes wrote:
 Le 18/12/12 10:39, Rainer M Krug a écrit :
 Don't be lured by the fact that XML presents itself as the solution to all 
 problems. I do
 not see how you could collaborate with co-authors using word, unless your 
 document is
 horribly simple.
 
 Obviously not lossless or that straight forward - but I guess much easier 
 then it is now.
 (even Libre Office an Word do not play that nicely together - even if I use 
 only docx, I get
 formating issues when I get the file back. But these are things I can handle.
 
 And actually, most documents are horribly simple, and how it looks in word 
 is irrelevant (no 
 painting of formats necessary), as long as the *structure* is kept. Even 
 images / tables
 could be skipped in word, as long as a placeholder is put there (or an 
 image).
 
 You are in the category of users who know what to expect. I wanted to point 
 out that in
 general, co-authors may not want to put up with collaborating on a document 
 that has weird
 formatting (no image, bad tables...) just because you do not want to use word 
 :)
 
 And indeed, using libreoffice in a team of word aficionados is already 
 painful IMO.

Absolutely! That's why I now installed MS Office 2010 under wine - works 
nicely, but word and
libreoffice *are* paifull..

Rainer

 
 JMarc
 



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Pavel Sanda
Rainer M Krug wrote:
 LyX itself. So my question: would this new XML format mean the good bye to 
 the plain text format

This is not good bye to the plain text format, most probably it would one of 
the many conversion
routes we provide (similarly as e.g. elyxer fro html), at least that's how I 
understood the aim of Nico.

 of the .lyx file, or would the XML be a new parallel, fully (and I mean 
 fully!) equivalent and
 exchangeable format in LyX?

From the very beginning this is not going to be _fully_ equivalent due to the 
approach (external
python script instead of C++ patch changing LyX internals). Any nontrivial 
fileformat change 
in future will break the script.

In any case the proper place where this should be discussed is developer list, 
not users list,
let's see what will happen there :)

Pavel


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread José Matos
On 12/17/2012 03:59 AM, Nico Williams wrote:
 I've written a Python script for converting .lyx files to XML.
 There's no DTD or schema, but it's a straightforward mapping of .lyx
 format to XML.  Things like \being_layout ... \end_layout become
 layout ../layout and so on.  This is much more faithful a
 mapping to XML than LyXHTML, or any of the other XML export formats,
 therefore it's much more amenable to transformations via XSLT.  I
 think it should be easy to produce an XSL for mapping back to .lyx,
 which should also help produce import from various XML schemas
 functionality.

 Would this be accepted?  Mind if I use a BSD license?

 Nico
 --

I have done this before with lyx2lyx. I remember that I sent the patch
to lyx-devel mailing list.

The harder part is: what about the math - mathml conversion?

I am busy at the moment so I did not look into further details.

Regards,

-- 
José Matos



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Liviu Andronic
On Tue, Dec 18, 2012 at 6:14 PM, José Matos jama...@lyx.org wrote:
 The harder part is: what about the math - mathml conversion?


Perhaps:
LaTeXML allows to convert LaTeX to MathML. 
http://www.mathweb.org/wiki/LaTeXML

or:
You can also displayed MathML as LaTeX source code using XSLT style
sheets (see xsltml).
http://www.mathweb.org/wiki/XSLT
http://xsltml.sourceforge.net/

Liviu


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Steve Litt
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



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Steve Litt
On Tue, 18 Dec 2012 13:52:44 +0100
Pavel Sanda sa...@lyx.org wrote:

 In any case the proper place where this should be discussed is
 developer list, not users list, let's see what will happen there :)
 
 Pavel


I disagree. At least some of us are now discussing the possibility
of formatting native LyX as standard XML, which, as I said in another
post, is human hostile. Many, many of us interact with LyX files
outside of the LyX executables or utilities.

These users have an incredible interest in the native format of LyX.
Don't think for a minute this is a developers only issue.

What I find the biggest insult is the motivation for this possible
disenfranchisement of LyX users dedicated enough to interact with LyX
files in nonstandard ways. That motivation? To accommodate Word
weenies. You've got to be kidding. Is this what free software has come
to?

Perhaps the most ironic thing is that if full XMLitization comes to
pass, you know what I'll use Nico's XML converter for? To export my 7
LyX-authored books to XML, from which I can convert them to plain-TeX.

SteveT


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Nico Williams
On Tue, Dec 18, 2012 at 10:43 PM, Steve Litt sl...@troubleshooters.com wrote:
 On Tue, 18 Dec 2012 10:22:17 +0100
 Rainer M Krug r.m.k...@gmail.com wrote:
 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.

That is what I'm doing, plus an XSL to produce .lyx from the XML.

As for the editability of .lyx vs. XML... well, both are editable in
$EDITOR.  And XML benefits from the ability to use XPath, XSL, ..., so
that if you have such XML tools at hand (and you would have to if LyX
were to switch to a native XML format) then you'd have a much easier
time doing programmatic transformations outside LyX than you do with
the current .lyx format.

Also, if LyX were to switch to a native XML format then my script and
XSLs could still be used to produce old-style .lyx for editing the way
you want to.  Such tools would still need to be supported for a long
time for migration purposes.

 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.

It's not XML that demands six files.

 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
 [...]

See above!

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
On 17/12/12 21:02, stefano franchi wrote:
 
 
 
 On Mon, Dec 17, 2012 at 1:47 PM, Richard Heck rgh...@lyx.org 
 mailto:rgh...@lyx.org wrote:
 
 On 12/17/2012 01:49 PM, Nico Williams wrote:
 
 On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck rgh...@lyx.org 
 mailto:rgh...@lyx.org wrote:
 
 On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:
 
 Meanwhile, the script I'm working on will effectively get us there, though in 
 a hackish way:
 externally, rather than by changing the C++ code.  But I think that's OK.  We 
 can make a lot of
 progress by first making sure there's a faithful XML representation of .lyx, 
 as that will allow
 all sorts of progress in terms of import/export conversions, and having such 
 an XML format to
 play with may help the team to think more about how to structure the C++ code.
 
 
 
 Sounds like a great idea. One question: would having an external but faithful 
 XML Lyx file
 allow XLS-translations to XML-based word-processing formats? That would solve 
 once and for all
 (hopefully) the problem of the Lyx--Word conversion that still plagues those 
 of us working in
 the Humanities (At least, it still affects me).

Not only Humanities - I am working in the field of Ecology, and nearly all 
co-authors use MS Word,
and most Journals hide their option of submitting LaTeX somewhere. So this 
would be brilliant.

Rainer

 
 
 Stefano
 
 
 -- __ Stefano Franchi 
 Associate Research
 Professor Department of Hispanic StudiesPh:   +1 (979) 845-2125 
 Texas AM
 University  Fax:  +1 (979) 845-6421 College Station, 
 Texas, USA
 
 stef...@tamu.edu mailto:stef...@tamu.edu http://stefano.cleinias.org



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
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?

Nevertheless, I think the XML format, keeping the import/export in mind, would 
be a huge step forward.

Cheers,

Rainer

 
 Nico --
 



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Jean-Marc Lasgouttes

Le 18/12/12 10:14, Rainer M Krug a écrit :

Sounds like a great idea. One question: would having an external but faithful 
XML Lyx file
allow XLS-translations to XML-based word-processing formats? That would solve 
once and for all
(hopefully) the problem of the Lyx--Word conversion that still plagues those 
of us working in
the Humanities (At least, it still affects me).


Not only Humanities - I am working in the field of Ecology, and nearly all 
co-authors use MS Word,
and most Journals hide their option of submitting LaTeX somewhere. So this 
would be brilliant.


Don't be lured by the fact that XML presents itself as the solution to 
all problems. I do not see how you could collaborate with co-authors 
using word, unless your document is horribly simple.


Today, although LyX format has been designed to follow LaTeX concepts, 
exchanging documents with latex users is not that simple. IMO sharing 
with word is not really going to work.


What could maybe be possible is to export to word and from there repair 
the file (or import and repair by hand).


JMarc


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
On 18/12/12 10:28, Jean-Marc Lasgouttes wrote:
 Le 18/12/12 10:14, Rainer M Krug a écrit :
 Sounds like a great idea. One question: would having an external but 
 faithful XML Lyx file 
 allow XLS-translations to XML-based word-processing formats? That would 
 solve once and for
 all (hopefully) the problem of the Lyx--Word conversion that still plagues 
 those of us
 working in the Humanities (At least, it still affects me).
 
 Not only Humanities - I am working in the field of Ecology, and nearly all 
 co-authors use MS
 Word, and most Journals hide their option of submitting LaTeX somewhere. So 
 this would be
 brilliant.
 
 Don't be lured by the fact that XML presents itself as the solution to all 
 problems. I do not
 see how you could collaborate with co-authors using word, unless your 
 document is horribly
 simple.

Obviously not lossless or that straight forward - but I guess much easier then 
it is now. (even
Libre Office an Word do not play that nicely together - even if I use only 
docx, I get formating
issues when I get the file back. But these are things I can handle.

And actually, most documents are horribly simple, and how it looks in word is 
irrelevant (no
painting of formats necessary), as long as the *structure* is kept. Even images 
/ tables could be
skipped in word, as long as a placeholder is put there (or an image).

Cheers,

Rainer

 
 Today, although LyX format has been designed to follow LaTeX concepts, 
 exchanging documents
 with latex users is not that simple. IMO sharing with word is not really 
 going to work.
 
 What could maybe be possible is to export to word and from there repair the 
 file (or import
 and repair by hand).
 
 JMarc
 



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Jean-Marc Lasgouttes

Le 18/12/12 10:39, Rainer M Krug a écrit :

Don't be lured by the fact that XML presents itself as the solution to all 
problems. I do not
see how you could collaborate with co-authors using word, unless your document 
is horribly
simple.


Obviously not lossless or that straight forward - but I guess much easier then 
it is now. (even
Libre Office an Word do not play that nicely together - even if I use only 
docx, I get formating
issues when I get the file back. But these are things I can handle.

And actually, most documents are horribly simple, and how it looks in word is 
irrelevant (no
painting of formats necessary), as long as the *structure* is kept. Even images 
/ tables could be
skipped in word, as long as a placeholder is put there (or an image).


You are in the category of users who know what to expect. I wanted to 
point out that in general, co-authors may not want to put up with 
collaborating on a document that has weird formatting (no image, bad 
tables...) just because you do not want to use word :)


And indeed, using libreoffice in a team of word aficionados is already 
painful IMO.


JMarc


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
On 18/12/12 10:57, Jean-Marc Lasgouttes wrote:
 Le 18/12/12 10:39, Rainer M Krug a écrit :
 Don't be lured by the fact that XML presents itself as the solution to all 
 problems. I do
 not see how you could collaborate with co-authors using word, unless your 
 document is
 horribly simple.
 
 Obviously not lossless or that straight forward - but I guess much easier 
 then it is now.
 (even Libre Office an Word do not play that nicely together - even if I use 
 only docx, I get
 formating issues when I get the file back. But these are things I can handle.
 
 And actually, most documents are horribly simple, and how it looks in word 
 is irrelevant (no 
 painting of formats necessary), as long as the *structure* is kept. Even 
 images / tables
 could be skipped in word, as long as a placeholder is put there (or an 
 image).
 
 You are in the category of users who know what to expect. I wanted to point 
 out that in
 general, co-authors may not want to put up with collaborating on a document 
 that has weird
 formatting (no image, bad tables...) just because you do not want to use word 
 :)
 
 And indeed, using libreoffice in a team of word aficionados is already 
 painful IMO.

Absolutely! That's why I now installed MS Office 2010 under wine - works 
nicely, but word and
libreoffice *are* paifull..

Rainer

 
 JMarc
 



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Pavel Sanda
Rainer M Krug wrote:
 LyX itself. So my question: would this new XML format mean the good bye to 
 the plain text format

This is not good bye to the plain text format, most probably it would one of 
the many conversion
routes we provide (similarly as e.g. elyxer fro html), at least that's how I 
understood the aim of Nico.

 of the .lyx file, or would the XML be a new parallel, fully (and I mean 
 fully!) equivalent and
 exchangeable format in LyX?

From the very beginning this is not going to be _fully_ equivalent due to the 
approach (external
python script instead of C++ patch changing LyX internals). Any nontrivial 
fileformat change 
in future will break the script.

In any case the proper place where this should be discussed is developer list, 
not users list,
let's see what will happen there :)

Pavel


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread José Matos
On 12/17/2012 03:59 AM, Nico Williams wrote:
 I've written a Python script for converting .lyx files to XML.
 There's no DTD or schema, but it's a straightforward mapping of .lyx
 format to XML.  Things like \being_layout ... \end_layout become
 layout ../layout and so on.  This is much more faithful a
 mapping to XML than LyXHTML, or any of the other XML export formats,
 therefore it's much more amenable to transformations via XSLT.  I
 think it should be easy to produce an XSL for mapping back to .lyx,
 which should also help produce import from various XML schemas
 functionality.

 Would this be accepted?  Mind if I use a BSD license?

 Nico
 --

I have done this before with lyx2lyx. I remember that I sent the patch
to lyx-devel mailing list.

The harder part is: what about the math - mathml conversion?

I am busy at the moment so I did not look into further details.

Regards,

-- 
José Matos



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Liviu Andronic
On Tue, Dec 18, 2012 at 6:14 PM, José Matos jama...@lyx.org wrote:
 The harder part is: what about the math - mathml conversion?


Perhaps:
LaTeXML allows to convert LaTeX to MathML. 
http://www.mathweb.org/wiki/LaTeXML

or:
You can also displayed MathML as LaTeX source code using XSLT style
sheets (see xsltml).
http://www.mathweb.org/wiki/XSLT
http://xsltml.sourceforge.net/

Liviu


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Steve Litt
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



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Steve Litt
On Tue, 18 Dec 2012 13:52:44 +0100
Pavel Sanda sa...@lyx.org wrote:

 In any case the proper place where this should be discussed is
 developer list, not users list, let's see what will happen there :)
 
 Pavel


I disagree. At least some of us are now discussing the possibility
of formatting native LyX as standard XML, which, as I said in another
post, is human hostile. Many, many of us interact with LyX files
outside of the LyX executables or utilities.

These users have an incredible interest in the native format of LyX.
Don't think for a minute this is a developers only issue.

What I find the biggest insult is the motivation for this possible
disenfranchisement of LyX users dedicated enough to interact with LyX
files in nonstandard ways. That motivation? To accommodate Word
weenies. You've got to be kidding. Is this what free software has come
to?

Perhaps the most ironic thing is that if full XMLitization comes to
pass, you know what I'll use Nico's XML converter for? To export my 7
LyX-authored books to XML, from which I can convert them to plain-TeX.

SteveT


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Nico Williams
On Tue, Dec 18, 2012 at 10:43 PM, Steve Litt sl...@troubleshooters.com wrote:
 On Tue, 18 Dec 2012 10:22:17 +0100
 Rainer M Krug r.m.k...@gmail.com wrote:
 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.

That is what I'm doing, plus an XSL to produce .lyx from the XML.

As for the editability of .lyx vs. XML... well, both are editable in
$EDITOR.  And XML benefits from the ability to use XPath, XSL, ..., so
that if you have such XML tools at hand (and you would have to if LyX
were to switch to a native XML format) then you'd have a much easier
time doing programmatic transformations outside LyX than you do with
the current .lyx format.

Also, if LyX were to switch to a native XML format then my script and
XSLs could still be used to produce old-style .lyx for editing the way
you want to.  Such tools would still need to be supported for a long
time for migration purposes.

 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.

It's not XML that demands six files.

 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
 [...]

See above!

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
On 17/12/12 21:02, stefano franchi wrote:
> 
> 
> 
> On Mon, Dec 17, 2012 at 1:47 PM, Richard Heck  > wrote:
> 
> On 12/17/2012 01:49 PM, Nico Williams wrote:
> 
> On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck  > wrote:
> 
> On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:
> 
> Meanwhile, the script I'm working on will effectively get us there, though in 
> a hackish way:
> externally, rather than by changing the C++ code.  But I think that's OK.  We 
> can make a lot of
> progress by first making sure there's a faithful XML representation of .lyx, 
> as that will allow
> all sorts of progress in terms of import/export conversions, and having such 
> an XML format to
> play with may help the team to think more about how to structure the C++ code.
> 
> 
> 
> Sounds like a great idea. One question: would having an external but faithful 
> XML Lyx file
> allow XLS-translations to XML-based word-processing formats? That would solve 
> once and for all
> (hopefully) the problem of the Lyx-->Word conversion that still plagues those 
> of us working in
> the Humanities (At least, it still affects me).

Not only Humanities - I am working in the field of Ecology, and nearly all 
co-authors use MS Word,
and most Journals hide their option of submitting LaTeX somewhere. So this 
would be brilliant.

Rainer

> 
> 
> Stefano
> 
> 
> -- __ Stefano Franchi 
> Associate Research
> Professor Department of Hispanic StudiesPh:   +1 (979) 845-2125 
> Texas A
> University  Fax:  +1 (979) 845-6421 College Station, 
> Texas, USA
> 
> stef...@tamu.edu  http://stefano.cleinias.org



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
On 18/12/12 00:01, Nico Williams wrote:
> On Mon, Dec 17, 2012 at 3:15 PM, Alex Vergara Gil  wrote:
>> 
>>> On Mon, Dec 17, 2012 at 2:25 PM, Richard Heck  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?

Nevertheless, I think the XML format, keeping the import/export in mind, would 
be a huge step forward.

Cheers,

Rainer

> 
> Nico --
> 



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Jean-Marc Lasgouttes

Le 18/12/12 10:14, Rainer M Krug a écrit :

Sounds like a great idea. One question: would having an external but faithful 
XML Lyx file
allow XLS-translations to XML-based word-processing formats? That would solve 
once and for all
(hopefully) the problem of the Lyx-->Word conversion that still plagues those 
of us working in
the Humanities (At least, it still affects me).


Not only Humanities - I am working in the field of Ecology, and nearly all 
co-authors use MS Word,
and most Journals hide their option of submitting LaTeX somewhere. So this 
would be brilliant.


Don't be lured by the fact that XML presents itself as the solution to 
all problems. I do not see how you could collaborate with co-authors 
using word, unless your document is horribly simple.


Today, although LyX format has been designed to follow LaTeX concepts, 
exchanging documents with latex users is not that simple. IMO sharing 
with word is not really going to work.


What could maybe be possible is to export to word and from there repair 
the file (or import and repair by hand).


JMarc


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
On 18/12/12 10:28, Jean-Marc Lasgouttes wrote:
> Le 18/12/12 10:14, Rainer M Krug a écrit :
>>> Sounds like a great idea. One question: would having an external but 
>>> faithful XML Lyx file 
>>> allow XLS-translations to XML-based word-processing formats? That would 
>>> solve once and for
>>> all (hopefully) the problem of the Lyx-->Word conversion that still plagues 
>>> those of us
>>> working in the Humanities (At least, it still affects me).
>> 
>> Not only Humanities - I am working in the field of Ecology, and nearly all 
>> co-authors use MS
>> Word, and most Journals hide their option of submitting LaTeX somewhere. So 
>> this would be
>> brilliant.
> 
> Don't be lured by the fact that XML presents itself as the solution to all 
> problems. I do not
> see how you could collaborate with co-authors using word, unless your 
> document is horribly
> simple.

Obviously not lossless or that straight forward - but I guess much easier then 
it is now. (even
Libre Office an Word do not play that nicely together - even if I use only 
docx, I get formating
issues when I get the file back. But these are things I can handle.

And actually, most documents are horribly simple, and how it looks in word is 
irrelevant (no
painting of formats necessary), as long as the *structure* is kept. Even images 
/ tables could be
skipped in word, as long as a placeholder is put there (or an image).

Cheers,

Rainer

> 
> Today, although LyX format has been designed to follow LaTeX concepts, 
> exchanging documents
> with latex users is not that simple. IMO sharing with word is not really 
> going to work.
> 
> What could maybe be possible is to export to word and from there repair the 
> file (or import
> and repair by hand).
> 
> JMarc
> 



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Jean-Marc Lasgouttes

Le 18/12/12 10:39, Rainer M Krug a écrit :

Don't be lured by the fact that XML presents itself as the solution to all 
problems. I do not
see how you could collaborate with co-authors using word, unless your document 
is horribly
simple.


Obviously not lossless or that straight forward - but I guess much easier then 
it is now. (even
Libre Office an Word do not play that nicely together - even if I use only 
docx, I get formating
issues when I get the file back. But these are things I can handle.

And actually, most documents are horribly simple, and how it looks in word is 
irrelevant (no
painting of formats necessary), as long as the *structure* is kept. Even images 
/ tables could be
skipped in word, as long as a placeholder is put there (or an image).


You are in the category of users who know what to expect. I wanted to 
point out that in general, co-authors may not want to put up with 
collaborating on a document that has weird formatting (no image, bad 
tables...) just because you do not want to use word :)


And indeed, using libreoffice in a team of word aficionados is already 
painful IMO.


JMarc


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Rainer M Krug
On 18/12/12 10:57, Jean-Marc Lasgouttes wrote:
> Le 18/12/12 10:39, Rainer M Krug a écrit :
>>> Don't be lured by the fact that XML presents itself as the solution to all 
>>> problems. I do
>>> not see how you could collaborate with co-authors using word, unless your 
>>> document is
>>> horribly simple.
>> 
>> Obviously not lossless or that straight forward - but I guess much easier 
>> then it is now.
>> (even Libre Office an Word do not play that nicely together - even if I use 
>> only docx, I get
>> formating issues when I get the file back. But these are things I can handle.
>> 
>> And actually, most documents are horribly simple, and how it looks in word 
>> is irrelevant (no 
>> painting of formats necessary), as long as the *structure* is kept. Even 
>> images / tables
>> could be skipped in word, as long as a placeholder is put there (or an 
>> image).
> 
> You are in the category of users who know what to expect. I wanted to point 
> out that in
> general, co-authors may not want to put up with collaborating on a document 
> that has weird
> formatting (no image, bad tables...) just because you do not want to use word 
> :)
> 
> And indeed, using libreoffice in a team of word aficionados is already 
> painful IMO.

Absolutely! That's why I now installed MS Office 2010 under wine - works 
nicely, but word and
libreoffice *are* paifull..

Rainer

> 
> JMarc
> 



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Pavel Sanda
Rainer M Krug wrote:
> LyX itself. So my question: would this new XML format mean the "good bye" to 
> the plain text format

This is not "good bye" to the plain text format, most probably it would one of 
the many conversion
routes we provide (similarly as e.g. elyxer fro html), at least that's how I 
understood the aim of Nico.

> of the .lyx file, or would the XML be a new parallel, fully (and I mean 
> fully!) equivalent and
> exchangeable format in LyX?

>From the very beginning this is not going to be _fully_ equivalent due to the 
>approach (external
python script instead of C++ patch changing LyX internals). Any nontrivial 
fileformat change 
in future will break the script.

In any case the proper place where this should be discussed is developer list, 
not users list,
let's see what will happen there :)

Pavel


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread José Matos
On 12/17/2012 03:59 AM, Nico Williams wrote:
> I've written a Python script for converting .lyx files to XML.
> There's no DTD or schema, but it's a straightforward mapping of .lyx
> format to XML.  Things like \being_layout ... \end_layout become
> ... and so on.  This is much more faithful a
> mapping to XML than LyXHTML, or any of the other XML export formats,
> therefore it's much more amenable to transformations via XSLT.  I
> think it should be easy to produce an XSL for mapping back to .lyx,
> which should also help produce import from various XML schemas
> functionality.
>
> Would this be accepted?  Mind if I use a BSD license?
>
> Nico
> --

I have done this before with lyx2lyx. I remember that I sent the patch
to lyx-devel mailing list.

The harder part is: what about the math -> mathml conversion?

I am busy at the moment so I did not look into further details.

Regards,

-- 
José Matos



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Liviu Andronic
On Tue, Dec 18, 2012 at 6:14 PM, José Matos  wrote:
> The harder part is: what about the math -> mathml conversion?
>
>
Perhaps:
"LaTeXML allows to convert LaTeX to MathML. "
http://www.mathweb.org/wiki/LaTeXML

or:
"You can also displayed MathML as LaTeX source code using XSLT style
sheets (see xsltml)."
http://www.mathweb.org/wiki/XSLT
http://xsltml.sourceforge.net/

Liviu


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Steve Litt
On Tue, 18 Dec 2012 10:22:17 +0100
Rainer M Krug  wrote:

> On 18/12/12 00:01, Nico Williams wrote:
> > On Mon, Dec 17, 2012 at 3:15 PM, Alex Vergara Gil
> >  wrote:
> >> 
> >>> On Mon, Dec 17, 2012 at 2:25 PM, Richard Heck 
> >>> 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



Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Steve Litt
On Tue, 18 Dec 2012 13:52:44 +0100
Pavel Sanda  wrote:

> In any case the proper place where this should be discussed is
> developer list, not users list, let's see what will happen there :)
> 
> Pavel


I disagree. At least some of us are now discussing the possibility
of formatting native LyX as standard XML, which, as I said in another
post, is human hostile. Many, many of us interact with LyX files
outside of the LyX executables or utilities.

These users have an incredible interest in the native format of LyX.
Don't think for a minute this is a developers only issue.

What I find the biggest insult is the motivation for this possible
disenfranchisement of LyX users dedicated enough to interact with LyX
files in nonstandard ways. That motivation? To accommodate Word
weenies. You've got to be kidding. Is this what free software has come
to?

Perhaps the most ironic thing is that if full XMLitization comes to
pass, you know what I'll use Nico's XML converter for? To export my 7
LyX-authored books to XML, from which I can convert them to plain-TeX.

SteveT


Re: Would a native LyX XML schema be accepted?

2012-12-18 Thread Nico Williams
On Tue, Dec 18, 2012 at 10:43 PM, Steve Litt  wrote:
> On Tue, 18 Dec 2012 10:22:17 +0100
> Rainer M Krug  wrote:
>> 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.

That is what I'm doing, plus an XSL to produce .lyx from the XML.

As for the editability of .lyx vs. XML... well, both are editable in
$EDITOR.  And XML benefits from the ability to use XPath, XSL, ..., so
that if you have such XML tools at hand (and you would have to if LyX
were to switch to a native XML format) then you'd have a much easier
time doing programmatic transformations outside LyX than you do with
the current .lyx format.

Also, if LyX were to switch to a native XML format then my script and
XSLs could still be used to produce old-style .lyx for editing the way
you want to.  Such tools would still need to be supported for a long
time for migration purposes.

> 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.

It's not XML that demands "six files".

> 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
> [...]

See above!

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil


Would this be accepted?  Mind if I use a BSD license?

Nico
--

+1 with this. This is what LyX really needs to handle native XML schema in 
.lyx files. Please hurry up the desition of having this in LyX. I really 
want to see an outstanding WYSIWYM program that can handle metapackages, 
figures, etc inside a single file and fully  compatible with other office 
products in a copy-paste schema. Isn't there anyone who think this would be 
great???


Alex 



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/16/2012 10:59 PM, Nico Williams wrote:

I've written a Python script for converting .lyx files to XML.
There's no DTD or schema, but it's a straightforward mapping of .lyx
format to XML.  Things like \being_layout ... \end_layout become
layout ../layout and so on.  This is much more faithful a
mapping to XML than LyXHTML, or any of the other XML export formats,
therefore it's much more amenable to transformations via XSLT.  I
think it should be easy to produce an XSL for mapping back to .lyx,
which should also help produce import from various XML schemas
functionality.

Would this be accepted?  Mind if I use a BSD license?
I don't see any objection to this. I think we'd be happy to install a 
converter for this, too, so the transformation was generally available. 
If, however, we are going to install it, then I think it should probably 
be GPL2, for consistency, though other people will know better than I. 
In any event, this should go to lyx-devel.


There still are long-term plans to convert the native LyX format to XML. 
But it turns out to be more work than one might expect.


rh



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil


There still are long-term plans to convert the native LyX format to XML. 
But it turns out to be more work than one might expect.


rh



Really nice to hear about this, is there any schedule??? 


Alex


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:


There still are long-term plans to convert the native LyX format to 
XML. But it turns out to be more work than one might expect.


rh



Really nice to hear about this, is there any schedule???

No, we've been discussing it for years, but no-one has ever been 
sufficiently motivated actually to do it. As I said, it's harder than it 
sounds.


Richard



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck rgh...@lyx.org wrote:
 On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:
 There still are long-term plans to convert the native LyX format to XML.
 But it turns out to be more work than one might expect.

 rh

 Really nice to hear about this, is there any schedule???

 No, we've been discussing it for years, but no-one has ever been
 sufficiently motivated actually to do it. As I said, it's harder than it
 sounds.

I've filed some bugs last night about things that make it hard... :)

Meanwhile, the script I'm working on will effectively get us there,
though in a hackish way: externally, rather than by changing the C++
code.  But I think that's OK.  We can make a lot of progress by first
making sure there's a faithful XML representation of .lyx, as that
will allow all sorts of progress in terms of import/export
conversions, and having such an XML format to play with may help the
team to think more about how to structure the C++ code.

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/17/2012 01:49 PM, Nico Williams wrote:

On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck rgh...@lyx.org wrote:

On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:

There still are long-term plans to convert the native LyX format to XML.
But it turns out to be more work than one might expect.

rh

Really nice to hear about this, is there any schedule???


No, we've been discussing it for years, but no-one has ever been
sufficiently motivated actually to do it. As I said, it's harder than it
sounds.

I've filed some bugs last night about things that make it hard... :)

Meanwhile, the script I'm working on will effectively get us there,
though in a hackish way: externally, rather than by changing the C++
code.  But I think that's OK.  We can make a lot of progress by first
making sure there's a faithful XML representation of .lyx, as that
will allow all sorts of progress in terms of import/export
conversions, and having such an XML format to play with may help the
team to think more about how to structure the C++ code.


Yes, knowing exactly what the target output is makes the job a lot 
easier. In some ways, that's always been the obstacle.


rh



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread stefano franchi
On Mon, Dec 17, 2012 at 1:47 PM, Richard Heck rgh...@lyx.org wrote:

 On 12/17/2012 01:49 PM, Nico Williams wrote:

 On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck rgh...@lyx.org wrote:

 On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:

 Meanwhile, the script I'm working on will effectively get us there,
 though in a hackish way: externally, rather than by changing the C++
 code.  But I think that's OK.  We can make a lot of progress by first
 making sure there's a faithful XML representation of .lyx, as that
 will allow all sorts of progress in terms of import/export
 conversions, and having such an XML format to play with may help the
 team to think more about how to structure the C++ code.



Sounds like a great idea. One question: would having an external but
faithful XML Lyx file allow XLS-translations to XML-based word-processing
formats?
That would solve once and for all (hopefully) the problem of the Lyx--Word
conversion that still plagues those of us working in the Humanities (At
least, it still affects me).


Stefano


-- 
__
Stefano Franchi
Associate Research Professor
Department of Hispanic StudiesPh:   +1 (979) 845-2125
Texas AM University  Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil
Sounds like a great idea. One question: would having an external but faithful 
XML Lyx file allow XLS-translations to XML-based word-processing formats?
That would solve once and for all (hopefully) the problem of the Lyx--Word 
conversion that still plagues those of us working in the Humanities (At least, 
it still affects me).


Stefano
 -- 


Yes!!! This is the whole idea behind a native XML schema .lyx file. Not only 
word but also excel, powerpoint, copy-paste inline, ... , and so on would be 
solved easily in this way. 

Alex

Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/17/2012 03:16 PM, Alex Vergara Gil wrote:
Sounds like a great idea. One question: would having an external but 
faithful XML Lyx file allow XLS-translations to XML-based 
word-processing formats?
That would solve once and for all (hopefully) the problem of the 
Lyx--Word conversion that still plagues those of us working in the 
Humanities (At least, it still affects me).



Stefano
 --
Yes!!! This is the whole idea behind a native XML schema .lyx file. 
Not only word but also excel, powerpoint, copy-paste inline, ... , and 
so on would be solved easily in this way.
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.


rh



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
On Mon, Dec 17, 2012 at 2:02 PM, stefano franchi
stefano.fran...@gmail.com wrote:
 Sounds like a great idea. One question: would having an external but
 faithful XML Lyx file allow XLS-translations to XML-based word-processing
 formats?
 That would solve once and for all (hopefully) the problem of the Lyx--Word
 conversion that still plagues those of us working in the Humanities (At
 least, it still affects me).

Yes, that's precisely why I started this.  My particular goal is to
map to he xml2rfc schema.  I already have an XSL for doing that, but I
depend on LyXHTML output and there's much about LyXHTML that leaves me
unsatisfied -- a more faithful schema would make my task much simpler.
 Also, with a decent XML-.lyx XSL I could also map back from xml2rfc
schema, which is also a goal of mine.

I actually want to produce and contribute the following:

 - lyx2xml -- a script for converting .lyx to XML
 - xml2lyx -- an XSL for converting XML back to .lyx

 - an XSL for turning LyX XML into a more structure schema, from this:

layout name=SectionSection title/layout
!-- section contents follows --

to this:

section title=Section title!-- section contents --/section

 - an XSL to flatten the same and return to the native LyX XML schema

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
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
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil



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).


Alex 



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
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.

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil


Would this be accepted?  Mind if I use a BSD license?

Nico
--

+1 with this. This is what LyX really needs to handle native XML schema in 
.lyx files. Please hurry up the desition of having this in LyX. I really 
want to see an outstanding WYSIWYM program that can handle metapackages, 
figures, etc inside a single file and fully  compatible with other office 
products in a copy-paste schema. Isn't there anyone who think this would be 
great???


Alex 



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/16/2012 10:59 PM, Nico Williams wrote:

I've written a Python script for converting .lyx files to XML.
There's no DTD or schema, but it's a straightforward mapping of .lyx
format to XML.  Things like \being_layout ... \end_layout become
layout ../layout and so on.  This is much more faithful a
mapping to XML than LyXHTML, or any of the other XML export formats,
therefore it's much more amenable to transformations via XSLT.  I
think it should be easy to produce an XSL for mapping back to .lyx,
which should also help produce import from various XML schemas
functionality.

Would this be accepted?  Mind if I use a BSD license?
I don't see any objection to this. I think we'd be happy to install a 
converter for this, too, so the transformation was generally available. 
If, however, we are going to install it, then I think it should probably 
be GPL2, for consistency, though other people will know better than I. 
In any event, this should go to lyx-devel.


There still are long-term plans to convert the native LyX format to XML. 
But it turns out to be more work than one might expect.


rh



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil


There still are long-term plans to convert the native LyX format to XML. 
But it turns out to be more work than one might expect.


rh



Really nice to hear about this, is there any schedule??? 


Alex


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:


There still are long-term plans to convert the native LyX format to 
XML. But it turns out to be more work than one might expect.


rh



Really nice to hear about this, is there any schedule???

No, we've been discussing it for years, but no-one has ever been 
sufficiently motivated actually to do it. As I said, it's harder than it 
sounds.


Richard



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck rgh...@lyx.org wrote:
 On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:
 There still are long-term plans to convert the native LyX format to XML.
 But it turns out to be more work than one might expect.

 rh

 Really nice to hear about this, is there any schedule???

 No, we've been discussing it for years, but no-one has ever been
 sufficiently motivated actually to do it. As I said, it's harder than it
 sounds.

I've filed some bugs last night about things that make it hard... :)

Meanwhile, the script I'm working on will effectively get us there,
though in a hackish way: externally, rather than by changing the C++
code.  But I think that's OK.  We can make a lot of progress by first
making sure there's a faithful XML representation of .lyx, as that
will allow all sorts of progress in terms of import/export
conversions, and having such an XML format to play with may help the
team to think more about how to structure the C++ code.

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/17/2012 01:49 PM, Nico Williams wrote:

On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck rgh...@lyx.org wrote:

On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:

There still are long-term plans to convert the native LyX format to XML.
But it turns out to be more work than one might expect.

rh

Really nice to hear about this, is there any schedule???


No, we've been discussing it for years, but no-one has ever been
sufficiently motivated actually to do it. As I said, it's harder than it
sounds.

I've filed some bugs last night about things that make it hard... :)

Meanwhile, the script I'm working on will effectively get us there,
though in a hackish way: externally, rather than by changing the C++
code.  But I think that's OK.  We can make a lot of progress by first
making sure there's a faithful XML representation of .lyx, as that
will allow all sorts of progress in terms of import/export
conversions, and having such an XML format to play with may help the
team to think more about how to structure the C++ code.


Yes, knowing exactly what the target output is makes the job a lot 
easier. In some ways, that's always been the obstacle.


rh



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread stefano franchi
On Mon, Dec 17, 2012 at 1:47 PM, Richard Heck rgh...@lyx.org wrote:

 On 12/17/2012 01:49 PM, Nico Williams wrote:

 On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck rgh...@lyx.org wrote:

 On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:

 Meanwhile, the script I'm working on will effectively get us there,
 though in a hackish way: externally, rather than by changing the C++
 code.  But I think that's OK.  We can make a lot of progress by first
 making sure there's a faithful XML representation of .lyx, as that
 will allow all sorts of progress in terms of import/export
 conversions, and having such an XML format to play with may help the
 team to think more about how to structure the C++ code.



Sounds like a great idea. One question: would having an external but
faithful XML Lyx file allow XLS-translations to XML-based word-processing
formats?
That would solve once and for all (hopefully) the problem of the Lyx--Word
conversion that still plagues those of us working in the Humanities (At
least, it still affects me).


Stefano


-- 
__
Stefano Franchi
Associate Research Professor
Department of Hispanic StudiesPh:   +1 (979) 845-2125
Texas AM University  Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil
Sounds like a great idea. One question: would having an external but faithful 
XML Lyx file allow XLS-translations to XML-based word-processing formats?
That would solve once and for all (hopefully) the problem of the Lyx--Word 
conversion that still plagues those of us working in the Humanities (At least, 
it still affects me).


Stefano
 -- 


Yes!!! This is the whole idea behind a native XML schema .lyx file. Not only 
word but also excel, powerpoint, copy-paste inline, ... , and so on would be 
solved easily in this way. 

Alex

Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/17/2012 03:16 PM, Alex Vergara Gil wrote:
Sounds like a great idea. One question: would having an external but 
faithful XML Lyx file allow XLS-translations to XML-based 
word-processing formats?
That would solve once and for all (hopefully) the problem of the 
Lyx--Word conversion that still plagues those of us working in the 
Humanities (At least, it still affects me).



Stefano
 --
Yes!!! This is the whole idea behind a native XML schema .lyx file. 
Not only word but also excel, powerpoint, copy-paste inline, ... , and 
so on would be solved easily in this way.
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.


rh



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
On Mon, Dec 17, 2012 at 2:02 PM, stefano franchi
stefano.fran...@gmail.com wrote:
 Sounds like a great idea. One question: would having an external but
 faithful XML Lyx file allow XLS-translations to XML-based word-processing
 formats?
 That would solve once and for all (hopefully) the problem of the Lyx--Word
 conversion that still plagues those of us working in the Humanities (At
 least, it still affects me).

Yes, that's precisely why I started this.  My particular goal is to
map to he xml2rfc schema.  I already have an XSL for doing that, but I
depend on LyXHTML output and there's much about LyXHTML that leaves me
unsatisfied -- a more faithful schema would make my task much simpler.
 Also, with a decent XML-.lyx XSL I could also map back from xml2rfc
schema, which is also a goal of mine.

I actually want to produce and contribute the following:

 - lyx2xml -- a script for converting .lyx to XML
 - xml2lyx -- an XSL for converting XML back to .lyx

 - an XSL for turning LyX XML into a more structure schema, from this:

layout name=SectionSection title/layout
!-- section contents follows --

to this:

section title=Section title!-- section contents --/section

 - an XSL to flatten the same and return to the native LyX XML schema

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
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
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil



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).


Alex 



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
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.

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil


Would this be accepted?  Mind if I use a BSD license?

Nico
--

+1 with this. This is what LyX really needs to handle native XML schema in 
.lyx files. Please hurry up the desition of having this in LyX. I really 
want to see an outstanding WYSIWYM program that can handle metapackages, 
figures, etc inside a single file and fully  compatible with other office 
products in a copy-paste schema. Isn't there anyone who think this would be 
great???


Alex 



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/16/2012 10:59 PM, Nico Williams wrote:

I've written a Python script for converting .lyx files to XML.
There's no DTD or schema, but it's a straightforward mapping of .lyx
format to XML.  Things like \being_layout ... \end_layout become
... and so on.  This is much more faithful a
mapping to XML than LyXHTML, or any of the other XML export formats,
therefore it's much more amenable to transformations via XSLT.  I
think it should be easy to produce an XSL for mapping back to .lyx,
which should also help produce import from various XML schemas
functionality.

Would this be accepted?  Mind if I use a BSD license?
I don't see any objection to this. I think we'd be happy to install a 
converter for this, too, so the transformation was generally available. 
If, however, we are going to install it, then I think it should probably 
be GPL2, for consistency, though other people will know better than I. 
In any event, this should go to lyx-devel.


There still are long-term plans to convert the native LyX format to XML. 
But it turns out to be more work than one might expect.


rh



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil


There still are long-term plans to convert the native LyX format to XML. 
But it turns out to be more work than one might expect.


rh



Really nice to hear about this, is there any schedule??? 


Alex


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:


There still are long-term plans to convert the native LyX format to 
XML. But it turns out to be more work than one might expect.


rh



Really nice to hear about this, is there any schedule???

No, we've been discussing it for years, but no-one has ever been 
sufficiently motivated actually to do it. As I said, it's harder than it 
sounds.


Richard



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck  wrote:
> On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:
>>> There still are long-term plans to convert the native LyX format to XML.
>>> But it turns out to be more work than one might expect.
>>>
>>> rh
>>
>> Really nice to hear about this, is there any schedule???
>>
> No, we've been discussing it for years, but no-one has ever been
> sufficiently motivated actually to do it. As I said, it's harder than it
> sounds.

I've filed some bugs last night about things that make it hard... :)

Meanwhile, the script I'm working on will effectively get us there,
though in a hackish way: externally, rather than by changing the C++
code.  But I think that's OK.  We can make a lot of progress by first
making sure there's a faithful XML representation of .lyx, as that
will allow all sorts of progress in terms of import/export
conversions, and having such an XML format to play with may help the
team to think more about how to structure the C++ code.

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/17/2012 01:49 PM, Nico Williams wrote:

On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck  wrote:

On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:

There still are long-term plans to convert the native LyX format to XML.
But it turns out to be more work than one might expect.

rh

Really nice to hear about this, is there any schedule???


No, we've been discussing it for years, but no-one has ever been
sufficiently motivated actually to do it. As I said, it's harder than it
sounds.

I've filed some bugs last night about things that make it hard... :)

Meanwhile, the script I'm working on will effectively get us there,
though in a hackish way: externally, rather than by changing the C++
code.  But I think that's OK.  We can make a lot of progress by first
making sure there's a faithful XML representation of .lyx, as that
will allow all sorts of progress in terms of import/export
conversions, and having such an XML format to play with may help the
team to think more about how to structure the C++ code.


Yes, knowing exactly what the target output is makes the job a lot 
easier. In some ways, that's always been the obstacle.


rh



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread stefano franchi
On Mon, Dec 17, 2012 at 1:47 PM, Richard Heck  wrote:

> On 12/17/2012 01:49 PM, Nico Williams wrote:
>
>> On Mon, Dec 17, 2012 at 12:21 PM, Richard Heck  wrote:
>>
>>> On 12/17/2012 11:45 AM, Alex Vergara Gil wrote:
>>>
>> Meanwhile, the script I'm working on will effectively get us there,
>> though in a hackish way: externally, rather than by changing the C++
>> code.  But I think that's OK.  We can make a lot of progress by first
>> making sure there's a faithful XML representation of .lyx, as that
>> will allow all sorts of progress in terms of import/export
>> conversions, and having such an XML format to play with may help the
>> team to think more about how to structure the C++ code.
>>
>
>
Sounds like a great idea. One question: would having an external but
faithful XML Lyx file allow XLS-translations to XML-based word-processing
formats?
That would solve once and for all (hopefully) the problem of the Lyx-->Word
conversion that still plagues those of us working in the Humanities (At
least, it still affects me).


Stefano


-- 
__
Stefano Franchi
Associate Research Professor
Department of Hispanic StudiesPh:   +1 (979) 845-2125
Texas A University  Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil
Sounds like a great idea. One question: would having an external but faithful 
XML Lyx file allow XLS-translations to XML-based word-processing formats?
That would solve once and for all (hopefully) the problem of the Lyx-->Word 
conversion that still plagues those of us working in the Humanities (At least, 
it still affects me).


Stefano
 -- 


Yes!!! This is the whole idea behind a native XML schema .lyx file. Not only 
word but also excel, powerpoint, copy-paste inline, ... , and so on would be 
solved easily in this way. 

Alex

Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Richard Heck

On 12/17/2012 03:16 PM, Alex Vergara Gil wrote:
Sounds like a great idea. One question: would having an external but 
faithful XML Lyx file allow XLS-translations to XML-based 
word-processing formats?
That would solve once and for all (hopefully) the problem of the 
Lyx-->Word conversion that still plagues those of us working in the 
Humanities (At least, it still affects me).



Stefano
 --
Yes!!! This is the whole idea behind a native XML schema .lyx file. 
Not only word but also excel, powerpoint, copy-paste inline, ... , and 
so on would be solved easily in this way.
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.


rh



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
On Mon, Dec 17, 2012 at 2:02 PM, stefano franchi
 wrote:
> Sounds like a great idea. One question: would having an external but
> faithful XML Lyx file allow XLS-translations to XML-based word-processing
> formats?
> That would solve once and for all (hopefully) the problem of the Lyx-->Word
> conversion that still plagues those of us working in the Humanities (At
> least, it still affects me).

Yes, that's precisely why I started this.  My particular goal is to
map to he xml2rfc schema.  I already have an XSL for doing that, but I
depend on LyXHTML output and there's much about LyXHTML that leaves me
unsatisfied -- a more faithful schema would make my task much simpler.
 Also, with a decent XML->.lyx XSL I could also map back from xml2rfc
schema, which is also a goal of mine.

I actually want to produce and contribute the following:

 - lyx2xml -- a script for converting .lyx to XML
 - xml2lyx -- an XSL for converting XML back to .lyx

 - an XSL for turning LyX XML into a more structure schema, from this:



 - an XSL to flatten the same and return to the native LyX XML schema

Nico
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
On Mon, Dec 17, 2012 at 2:25 PM, Richard Heck  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
--


Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Alex Vergara Gil



On Mon, Dec 17, 2012 at 2:25 PM, Richard Heck  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).


Alex 



Re: Would a native LyX XML schema be accepted?

2012-12-17 Thread Nico Williams
On Mon, Dec 17, 2012 at 3:15 PM, Alex Vergara Gil  wrote:
>
>> On Mon, Dec 17, 2012 at 2:25 PM, Richard Heck  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.

Nico
--


Would a native LyX XML schema be accepted?

2012-12-16 Thread Nico Williams
I've written a Python script for converting .lyx files to XML.
There's no DTD or schema, but it's a straightforward mapping of .lyx
format to XML.  Things like \being_layout ... \end_layout become
layout ../layout and so on.  This is much more faithful a
mapping to XML than LyXHTML, or any of the other XML export formats,
therefore it's much more amenable to transformations via XSLT.  I
think it should be easy to produce an XSL for mapping back to .lyx,
which should also help produce import from various XML schemas
functionality.

Would this be accepted?  Mind if I use a BSD license?

Nico
--


Would a native LyX XML schema be accepted?

2012-12-16 Thread Nico Williams
I've written a Python script for converting .lyx files to XML.
There's no DTD or schema, but it's a straightforward mapping of .lyx
format to XML.  Things like \being_layout ... \end_layout become
layout ../layout and so on.  This is much more faithful a
mapping to XML than LyXHTML, or any of the other XML export formats,
therefore it's much more amenable to transformations via XSLT.  I
think it should be easy to produce an XSL for mapping back to .lyx,
which should also help produce import from various XML schemas
functionality.

Would this be accepted?  Mind if I use a BSD license?

Nico
--


Would a native LyX XML schema be accepted?

2012-12-16 Thread Nico Williams
I've written a Python script for converting .lyx files to XML.
There's no DTD or schema, but it's a straightforward mapping of .lyx
format to XML.  Things like \being_layout ... \end_layout become
... and so on.  This is much more faithful a
mapping to XML than LyXHTML, or any of the other XML export formats,
therefore it's much more amenable to transformations via XSLT.  I
think it should be easy to produce an XSL for mapping back to .lyx,
which should also help produce import from various XML schemas
functionality.

Would this be accepted?  Mind if I use a BSD license?

Nico
--