Ticket #10 (accepted defect)

Opened 3 years ago

Last modified 3 years ago

Definitions are implemented using tables

Reported by: dag.wieers.com Owned by: aurelien
Priority: major Milestone: 1.3
Component: XSL Version: 1.2
Keywords: Cc:

Description

I am very excited with xhtml2odt (especially for using it with asciidoc), however definition lists are visualized using tables, which make existing documents look really awful :-/

PS Version 1.2 is not selectable in trac for tickets.

Change History

comment:1 Changed 3 years ago by aurelien.bompard.org

  • Status changed from new to accepted

Right, I went the quick'n'dirty way on this one. Any suggestion on how it should look like ? List items ?

comment:2 Changed 3 years ago by aurelien.bompard.org

  • Version changed from HEAD to 1.2

comment:3 Changed 3 years ago by aurelien.bompard.org

It should be fixed in 961a69d, could you take a look ?

comment:4 Changed 3 years ago by dag.wieers.com

Aurelien, personally I don't think it doesn't matter what it looks like, as long as it has it's own (distinct) style applied. The easiest is to fall back to a default OpenOffice? style (if one exist) or take whatever DocBook? is using.

The reason why I am interested in xhtml2odt (and docbook2odf) is that one can apply its own OpenOffice? style template and have their document styled according to that. On my unoconv homepage (http://dag.wieers.com/home-made/unoconv/) I have a demo of my workflow for a curriculum vitae. This is something that would equally work for xhtml2odt, if and only if every distinct object in the XHTML document translate to a distinct style. Even docbook2odf doesn't do it correctly in all cases.

That said, I will test the latest xhtml2odt. Could you look at the demo ? It would be nice of xhtml2odt could apply ODF template(s) during conversion as well. This would allow anyone to create a custom (corporate) identity and re-apply it on any document. Quite powerful.

comment:5 Changed 3 years ago by dag.wieers.com

I have tested HEAD and when converting my résumé I only have 5 styles set:

Default
Heading
Heading 2
Heading 3
Text body

Still the definitions are set in bold. List-items and links have no other styles either, so in these cases it is hard (if not impossible) to do anything related to style inside of the OpenOffice? document. Also the sidebar block does not seem to be supported either.

So the use of styles is preferred (that's what we tried to aim for with docbook2odf, but personally I dislike XSL very much ;-))

comment:6 Changed 3 years ago by aurelien

  • Owner changed from aurelien.bompard.org to aurelien

The easiest is to fall back to a default OpenOffice style (if one exist)

Sadly, there's no OpenOffice style for definition lists.

Could you look at the demo ?

I did. Very interesting indeed.

It would be nice of xhtml2odt could apply ODF template(s) during conversion as well

It does not actually apply an OTT template, but there's a similar feature : you can include the output text in the middle of an existing ODT document. The styles of the ODT document are preserved, as well as the page headers/footers, etc. See the --replace option on the command line.

I have tested HEAD and when converting my résumé I only have 5 styles set

Unused styles are not added, thus the low number of styles.

Still the definitions are set in bold.

Yes, yet another proof of my lazyness. I'll make a proper separate style, now that I know your use case better.

List-items and links have no other styles either

List items do have a style. Lists have the "List 1" style, available in the "list styles" tab of the stylist in OpenOffice (F11). You should be able to customize it that way. Numbered lists have the "Numbering 1" style.

Also the sidebar block does not seem to be supported either.

Which sidebar are you referring to ? Do you have an HTML example ?

I agree that xhtml2odt should use styles as much as possible, no argument there.

comment:7 Changed 3 years ago by aurelien

Done in f4e7596, please test.

Note: See TracTickets for help on using tickets.