Re: LyXHTML, design intent?

2013-07-09 Thread Guenter Milde
Dear Steve,

thanks for reporting issues with LyX HTML export back. I think this
feedback is important to get the best out of the effort of the coders and
is valued by both.

However, please make it *very* clear in your posts, whether you report
about LyX's native HTML export or the external eLyXer program:

On 2013-07-09, Steve Litt wrote:

 I'm making a postprocessor to make the output of LyX's LyXHTML
 xhtml export more compatible with ePub. 

... [all the important questions] ...

 This one feature of eLyXer's xhtml conversion, ...

I know that, from a users point, the difference in calling the export is
just one line in the menu. However the inner working and the philosophy
of native LyX export vs. eLyXer is sometimes orthogonal.

While both authors monitor this list and respond to questions and
requests, trying to fix a problem of the *other* tool (and then realizing
that the description does not fit) has the potential to turn your valuable
feedback into an irritant to (at least) one of them.


Günter





Re: LyXHTML, design intent?

2013-07-09 Thread Richard Heck

On 07/08/2013 09:52 PM, Steve Litt wrote:

Hi all,

I'm making a postprocessor to make the output of LyX's LyXHTML
xhtml export more compatible with ePub. Before I code my postprocessor,
I'd like to know the design intent of the LyXHTML exporter, so I don't
accidentally throw away a good thing.

First, I notice every container start tag is followed by an anchor with
an id like magicparlabel-1140, like this:

div class=standarda id='magicparlabel-1140' /

1) What was the reason you gave an a to every container?


This is so things like links to references are guaranteed to work.


2) Why did you use an a instead of
div class=standard id='magicparlabel-1140'


At the time this was written, there were too many browsers still active
that did not fully support links to id tags on other elements. Now that
they do, this has been changed for 2.1.x. The id is on the main element.


3) Why did you use doublequotes in the class, but singlequotes in the
a id?


No idea. Just one of those things. For all I know, it is different in 2.1.


I have some questions about your mapping in xhtml exports of sectional
type environments to h1-h6. On the conversion of my book, Part and
Chapter both map to h1, with Section mapping to h2, Subsection to
h3, and so on. Did you do that so you wouldn't run past h6? If not,
what was the reason?


Part is not that commonly used. It seemed wrong to make chapters
h2 by default. As we've discussed previously, this can be changed
using layouts.


Thank you, thank you, THANK YOU for, in your xhtml conversion, passing
through every single environment and character style I used in my
book, and making CSS styles for them. That's a class act, and the single
most important thing in converting to ePub.


In a way, the idea behind the XHTML output (again, this is not eLyXer)
is (a) to respect what is in the layout files, so you don't have to write a
lot of duplicate code and (b) to mimic what is on the screen, generally
speaking. So if you define a character style, then, by default, we create
CSS to mimic how it looks on screen. If you want to output something
else, then that can easily be done in the layout file, as well.

Richard



Re: LyXHTML, design intent?

2013-07-09 Thread Nico Williams
On Mon, Jul 8, 2013 at 8:52 PM, Steve Litt sl...@troubleshooters.com wrote:
 [...]

Let me do a broken disk impression...

I've used XHTML + XSLT successfully to convert to other XML schemas.
XHTML doesn't quite preserve enough metadata for me though, so I've
also written a LyX - XML converter[0] that preserves as much metadata
as possible (if I had written an XML - .lyx XSLT I could test that it
round-trips, which it should, with only minute differences[1]).

I know there's been some efforts recently to add native XML support to
LyX, so soon you might not need to use either LyXHTML nor my lyx2xml.

[0] https://github.com/nicowilliams/lyx2rfc/blob/master/src/lyx2xml
(and associated *.py files in the same directory).

[1] LyX allows you to mix styles in such a way that doesn't involve
proper containership.  lyx2xml works around this by closing and
re-opening styles to restore proper containership.  This is the only
thing that wouldn't round-trip exactly, but you wouldn't notice this
difference in the GUI.

Nico
--


Re: LyXHTML, design intent?

2013-07-09 Thread Guenter Milde
Dear Steve,

thanks for reporting issues with LyX HTML export back. I think this
feedback is important to get the best out of the effort of the coders and
is valued by both.

However, please make it *very* clear in your posts, whether you report
about LyX's native HTML export or the external eLyXer program:

On 2013-07-09, Steve Litt wrote:

 I'm making a postprocessor to make the output of LyX's LyXHTML
 xhtml export more compatible with ePub. 

... [all the important questions] ...

 This one feature of eLyXer's xhtml conversion, ...

I know that, from a users point, the difference in calling the export is
just one line in the menu. However the inner working and the philosophy
of native LyX export vs. eLyXer is sometimes orthogonal.

While both authors monitor this list and respond to questions and
requests, trying to fix a problem of the *other* tool (and then realizing
that the description does not fit) has the potential to turn your valuable
feedback into an irritant to (at least) one of them.


Günter





Re: LyXHTML, design intent?

2013-07-09 Thread Richard Heck

On 07/08/2013 09:52 PM, Steve Litt wrote:

Hi all,

I'm making a postprocessor to make the output of LyX's LyXHTML
xhtml export more compatible with ePub. Before I code my postprocessor,
I'd like to know the design intent of the LyXHTML exporter, so I don't
accidentally throw away a good thing.

First, I notice every container start tag is followed by an anchor with
an id like magicparlabel-1140, like this:

div class=standarda id='magicparlabel-1140' /

1) What was the reason you gave an a to every container?


This is so things like links to references are guaranteed to work.


2) Why did you use an a instead of
div class=standard id='magicparlabel-1140'


At the time this was written, there were too many browsers still active
that did not fully support links to id tags on other elements. Now that
they do, this has been changed for 2.1.x. The id is on the main element.


3) Why did you use doublequotes in the class, but singlequotes in the
a id?


No idea. Just one of those things. For all I know, it is different in 2.1.


I have some questions about your mapping in xhtml exports of sectional
type environments to h1-h6. On the conversion of my book, Part and
Chapter both map to h1, with Section mapping to h2, Subsection to
h3, and so on. Did you do that so you wouldn't run past h6? If not,
what was the reason?


Part is not that commonly used. It seemed wrong to make chapters
h2 by default. As we've discussed previously, this can be changed
using layouts.


Thank you, thank you, THANK YOU for, in your xhtml conversion, passing
through every single environment and character style I used in my
book, and making CSS styles for them. That's a class act, and the single
most important thing in converting to ePub.


In a way, the idea behind the XHTML output (again, this is not eLyXer)
is (a) to respect what is in the layout files, so you don't have to write a
lot of duplicate code and (b) to mimic what is on the screen, generally
speaking. So if you define a character style, then, by default, we create
CSS to mimic how it looks on screen. If you want to output something
else, then that can easily be done in the layout file, as well.

Richard



Re: LyXHTML, design intent?

2013-07-09 Thread Nico Williams
On Mon, Jul 8, 2013 at 8:52 PM, Steve Litt sl...@troubleshooters.com wrote:
 [...]

Let me do a broken disk impression...

I've used XHTML + XSLT successfully to convert to other XML schemas.
XHTML doesn't quite preserve enough metadata for me though, so I've
also written a LyX - XML converter[0] that preserves as much metadata
as possible (if I had written an XML - .lyx XSLT I could test that it
round-trips, which it should, with only minute differences[1]).

I know there's been some efforts recently to add native XML support to
LyX, so soon you might not need to use either LyXHTML nor my lyx2xml.

[0] https://github.com/nicowilliams/lyx2rfc/blob/master/src/lyx2xml
(and associated *.py files in the same directory).

[1] LyX allows you to mix styles in such a way that doesn't involve
proper containership.  lyx2xml works around this by closing and
re-opening styles to restore proper containership.  This is the only
thing that wouldn't round-trip exactly, but you wouldn't notice this
difference in the GUI.

Nico
--


Re: LyXHTML, design intent?

2013-07-09 Thread Guenter Milde
Dear Steve,

thanks for reporting issues with LyX HTML export back. I think this
feedback is important to get the best out of the effort of the coders and
is valued by both.

However, please make it *very* clear in your posts, whether you report
about LyX's "native HTML export" or the external "eLyXer" program:

On 2013-07-09, Steve Litt wrote:

> I'm making a postprocessor to make the output of LyX's LyXHTML
> xhtml export more compatible with ePub. 

... [all the important questions] ...

> This one feature of eLyXer's xhtml conversion, ...

I know that, from a users point, the difference in calling the export is
just one line in the menu. However the inner working and the philosophy
of native LyX export vs. eLyXer is sometimes orthogonal.

While both authors monitor this list and respond to questions and
requests, trying to fix a problem of the *other* tool (and then realizing
that the description does not fit) has the potential to turn your valuable
feedback into an irritant to (at least) one of them.


Günter





Re: LyXHTML, design intent?

2013-07-09 Thread Richard Heck

On 07/08/2013 09:52 PM, Steve Litt wrote:

Hi all,

I'm making a postprocessor to make the output of LyX's LyXHTML
xhtml export more compatible with ePub. Before I code my postprocessor,
I'd like to know the design intent of the LyXHTML exporter, so I don't
accidentally throw away a good thing.

First, I notice every container start tag is followed by an anchor with
an id like "magicparlabel-1140", like this:



1) What was the reason you gave an  to every container?


This is so things like links to references are guaranteed to work.


2) Why did you use an  instead of



At the time this was written, there were too many browsers still active
that did not fully support links to id tags on other elements. Now that
they do, this has been changed for 2.1.x. The id is on the main element.


3) Why did you use doublequotes in the class, but singlequotes in the
 id?


No idea. Just one of those things. For all I know, it is different in 2.1.


I have some questions about your mapping in xhtml exports of sectional
type environments to -. On the conversion of my book, Part and
Chapter both map to , with Section mapping to , Subsection to
, and so on. Did you do that so you wouldn't run past ? If not,
what was the reason?


Part is not that commonly used. It seemed wrong to make chapters
h2 by default. As we've discussed previously, this can be changed
using layouts.


Thank you, thank you, THANK YOU for, in your xhtml conversion, passing
through every single environment and character style I used in my
book, and making CSS styles for them. That's a class act, and the single
most important thing in converting to ePub.


In a way, the idea behind the XHTML output (again, this is not eLyXer)
is (a) to respect what is in the layout files, so you don't have to write a
lot of duplicate code and (b) to mimic what is on the screen, generally
speaking. So if you define a character style, then, by default, we create
CSS to mimic how it looks on screen. If you want to output something
else, then that can easily be done in the layout file, as well.

Richard



Re: LyXHTML, design intent?

2013-07-09 Thread Nico Williams
On Mon, Jul 8, 2013 at 8:52 PM, Steve Litt  wrote:
> [...]

Let me do a broken disk impression...

I've used XHTML + XSLT successfully to convert to other XML schemas.
XHTML doesn't quite preserve enough metadata for me though, so I've
also written a LyX -> XML converter[0] that preserves as much metadata
as possible (if I had written an XML -> .lyx XSLT I could test that it
round-trips, which it should, with only minute differences[1]).

I know there's been some efforts recently to add native XML support to
LyX, so soon you might not need to use either LyXHTML nor my lyx2xml.

[0] https://github.com/nicowilliams/lyx2rfc/blob/master/src/lyx2xml
(and associated *.py files in the same directory).

[1] LyX allows you to mix styles in such a way that doesn't involve
proper containership.  lyx2xml works around this by closing and
re-opening styles to restore proper containership.  This is the only
thing that wouldn't round-trip exactly, but you wouldn't notice this
difference in the GUI.

Nico
--


LyXHTML, design intent?

2013-07-08 Thread Steve Litt
Hi all,

I'm making a postprocessor to make the output of LyX's LyXHTML
xhtml export more compatible with ePub. Before I code my postprocessor,
I'd like to know the design intent of the LyXHTML exporter, so I don't
accidentally throw away a good thing.

First, I notice every container start tag is followed by an anchor with
an id like magicparlabel-1140, like this:

div class=standarda id='magicparlabel-1140' /

1) What was the reason you gave an a to every container?
2) Why did you use an a instead of
   div class=standard id='magicparlabel-1140'
3) Why did you use doublequotes in the class, but singlequotes in the
   a id?

I have some questions about your mapping in xhtml exports of sectional
type environments to h1-h6. On the conversion of my book, Part and
Chapter both map to h1, with Section mapping to h2, Subsection to
h3, and so on. Did you do that so you wouldn't run past h6? If not,
what was the reason? 

By the way, I've written code to put them in the order desired by the
person doing the conversion. It probably wouldn't be hard to modify my
code so anything lower than h6 would get mapped to div class=h7,
etc.

Thank you, thank you, THANK YOU for, in your xhtml conversion, passing
through every single environment and character style I used in my
book, and making CSS styles for them. That's a class act, and the single
most important thing in converting to ePub. The person doing the
conversion can pretty much kludge, freelance and hack everything else,
but those other exports that drop styles on the floor or prematurely
convert them to appearance make it easier to just write the whole thing
over again in HTML. This one feature of eLyXer's xhtml conversion, so
rare among converters, make any other hassles completely liveable.

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


LyXHTML, design intent?

2013-07-08 Thread Steve Litt
Hi all,

I'm making a postprocessor to make the output of LyX's LyXHTML
xhtml export more compatible with ePub. Before I code my postprocessor,
I'd like to know the design intent of the LyXHTML exporter, so I don't
accidentally throw away a good thing.

First, I notice every container start tag is followed by an anchor with
an id like magicparlabel-1140, like this:

div class=standarda id='magicparlabel-1140' /

1) What was the reason you gave an a to every container?
2) Why did you use an a instead of
   div class=standard id='magicparlabel-1140'
3) Why did you use doublequotes in the class, but singlequotes in the
   a id?

I have some questions about your mapping in xhtml exports of sectional
type environments to h1-h6. On the conversion of my book, Part and
Chapter both map to h1, with Section mapping to h2, Subsection to
h3, and so on. Did you do that so you wouldn't run past h6? If not,
what was the reason? 

By the way, I've written code to put them in the order desired by the
person doing the conversion. It probably wouldn't be hard to modify my
code so anything lower than h6 would get mapped to div class=h7,
etc.

Thank you, thank you, THANK YOU for, in your xhtml conversion, passing
through every single environment and character style I used in my
book, and making CSS styles for them. That's a class act, and the single
most important thing in converting to ePub. The person doing the
conversion can pretty much kludge, freelance and hack everything else,
but those other exports that drop styles on the floor or prematurely
convert them to appearance make it easier to just write the whole thing
over again in HTML. This one feature of eLyXer's xhtml conversion, so
rare among converters, make any other hassles completely liveable.

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


LyXHTML, design intent?

2013-07-08 Thread Steve Litt
Hi all,

I'm making a postprocessor to make the output of LyX's LyXHTML
xhtml export more compatible with ePub. Before I code my postprocessor,
I'd like to know the design intent of the LyXHTML exporter, so I don't
accidentally throw away a good thing.

First, I notice every container start tag is followed by an anchor with
an id like "magicparlabel-1140", like this:



1) What was the reason you gave an  to every container?
2) Why did you use an  instead of
   
3) Why did you use doublequotes in the class, but singlequotes in the
id?

I have some questions about your mapping in xhtml exports of sectional
type environments to -. On the conversion of my book, Part and
Chapter both map to , with Section mapping to , Subsection to
, and so on. Did you do that so you wouldn't run past ? If not,
what was the reason? 

By the way, I've written code to put them in the order desired by the
person doing the conversion. It probably wouldn't be hard to modify my
code so anything lower than  would get mapped to http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance