On 17/02/12 11:06, Dag Wieers wrote:
On Thu, 16 Feb 2012, Stuart Rackham wrote:

As I understand it (and I'm not 100% sure I do), ODF outputs can be styled
using a .styles file (for generating .fodt files using asciidoc) or an
.odt/.ott file (for generating .odt files using a2x).

1. The default asciidoc.odt.styles file is in the from the odt plugin directory.

2. *.styles "theme" files are installed from theme plugin directories.

3. An odt/ott template document which is specified explicitly with the
a2x-backend.py --base_doc=path command option.

More or less correct.


My guess is that very few users will want to deal with .fodt files directly,
preferring .odt files instead i.e. a2x will be used in preference to asciidoc.

Correct, but it makes no sense to distribute themes as ODT files IMO. And the
most important reason for not doing styles as an ODT is that it sucks to develop
themes together with improving the backend.

Yes, but really how many people will try to develop XML styles? That's akin to asking people to style FOP generated PDF by modifying XSLT stylesheets which, as I recall, was the main reason for the ODF backend in the first place i.e. you only need to interactively style an ott in Libre Office and not have to descend to XML or XSLT. Those brave few that do can use a '-a odf-styles=path' attribute.



So in my opinion, people can use ODF and ODT files including them on the
commandline, but asciidoc --theme falls back to XML stylesheets so that they
work for both flat XML ODF files as well as packaged ODF files.

And a2x falls back to ODF/ODT files, but can use XML stylesheets too.


Taking up Lex's point, I think the vast majority of users would want to style
with ott templates and not .styles files. The ability to style using
interactively generated ott files was the raison d'ĂȘtre for an ODF backend in
the first place.

Sure, but they will open and save modified files, and as such these are not
distributed themes. Any professional styler will prefer XML files over packaged
ODT files.

IMO 'prefering XML' is oxymoronic.




So why complicate things with .styles themes plugins? Instead ship any
built-in .styles files with the odt plugin and make an asciidoc '-a
odf-styles=path' attribute available for those users who want to use their own
.styles files.

Because at this point in time, working with ODT files does not work,

Why? I thought this was the big win that you got with ODF.


will not
help get people involved and makes it a lot harder to style _and_ asciidoc
cannot work with ODT files natively, it never will.

No, but it's a moot point -- apart from the ODF plugin developers, my guess is that virtually no one will use asciidoc directly for ODF they'll use a2x because:

1. .odt are prefered over .fodt
2. Users will prefer styling interactively using Libre/Open Office.



(Modifying styles in LibreOffice rewrites the whole file, moves stuff around,
adds stuff that's not needed, etc... While it's should work fine for simple
stuff, for professional use, eg. themes, this is not a proper solution. You
cannot track changes, and not only because it is inside a ZIP file)

So it's very very simple:

asciidoc --theme <name> uses XML styles, <name>.odt.styles
a2x --theme <name> uses XML styles, <name>.odt.styles
a2x --style-doc <file.odt> uses ODT/OTT styles, <file.odt>

Apart from that we need to learn a2x to create its own ODT files from scratch
(we know now what is needed) and to merge it with an existing ODT/OTT (has
issues now too).

I need some time to think this stuff through. Actually I was thinking of dog-fooding this whole extended backend plugins thing by separating epub into a backend plugin.

The ODF progress to date is impressive, I'm just keen not to create any millstones, unnecessary complexity or evolutionary dead ends.


Cheers, Stuart



Kind regards,

--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to