On 13/02/12 23:05, Dag Wieers wrote:
On Mon, 13 Feb 2012, Lex Trotman wrote:

On 13 February 2012 14:39, Stuart Rackham <[email protected]> wrote:
On 13/02/12 15:38, Lex Trotman wrote:

Stuart has put the changes in a2x in mercurial.  I *think* but don't
guarantee that I tested the a2x backend to work with it.  If it
doesn't shout and I'll try and help, but I don't have much time at the
moment.

I've just tried:

$ a2x -b odt doc/article.txt
a2x: ERROR: No base document found

Looking at your a2x-backend.py source I see that you need to pass a
--base_doc option sepecifying an odt file with the desired styles and also
saw a comment 'TODO default base doc?' in the source. Would be nice to just
go 'a2x -b odt some_document.txt' to generate an .odt file.

Agree, thats why the comment is there.

What we need is a document that gets installed to use as the default.
If Dag can make one with *all* the asciidoc_odf styles in it (but no
content that he would mind having installed on all asciidocs) and save
it from libreoffice as a normal packaged odt file then that should do.

Then the default needs to point to where it will get installed, I
guess the backend dir. a2x has that somewhere since it found this
backend :)

The problem I experienced was that it could not find to_odt, using the upstream
asciidoc/a2x, so I had to put our a2x in place :-/ Maybe I did something wrong.
I will investigate.

a2x locates a2x-backend.py files by running 'asciidoc --backend list' then checking the output for a directory with the same name as the backend.



Wrt. the packaged 'ott' file. I'll see if I can have the Makefile generate a
packaged example file with the default stylesheet included. It shouldn't be hard
to cobble something together with pax using stub files and our default 
stylesheet.

PS I added two new features to the Github issue tracker to include libreoffice
in a2x to allow conversions from odt to pdf or doc, and to support ODP files in
a2x. See:

https://github.com/dagwieers/asciidoc-odf/issues/24
https://github.com/dagwieers/asciidoc-odf/issues/25

Both are probably not that important at the moment.

It's a great idea to extend the odt a2x-backend.py to use Libre Office for other output formats (the a2x --format option value is available to a2x-backend.py as self.format). So you could run e.g.

  a2x --backend odt --format pdf mydoc.txt


Cheers, Stuart

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