Hi David
On 02/09/10 21:01, david wrote:
Hello,
Does anyone know xhtml2odt? (http://xhtml2odt.org/)
This program converts html file to odt. There is a python script
(xhtml2odt.py), and I am trying it. It does a pretty good job on html
files generated by asciidoc. A good point for me: the last version
(1.2) can convert complex tables with row and col spanning (it fails
for some of the examples of newtables.txt, but it is promising). I
found the resulting file better with xhtml2odt than with docbook2odf.
There is currently a problem with image-blocks: images were not
visible in the odt file. Aurélien Bompard looked at this, and told
this was because images were not included into a paragraph in the
xhtml file. For some internal reasons, it could not be handled in
xhtml2odt. I was wondering if this could be done in asciidoc, but only
Stuart could tell if this will break something.
Will not cause a problem if confined to it's own conf file (then use asciidoc -f
option), but the better solution would be to fix xhtml2odt.
I have modified xhtml11.conf:
[image-blockmacro]
<div class="imageblock{style? {style}}{role? {role}}"{id? id="{id}"}
{align? style="text-align:{align};"}{float? style="float:{float};"}>
<div class="content">
<a class="image" href="{link}">
<p>{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}"
alt="{alt={target}}"{width? width="{width}"}{height?
height="{height}"} /></p>
<p>{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}
{height? height="{height}"} src="data:image/
{eval:os.path.splitext('{target}')[1][1:]};base64,
{data-uri#}{sys:python -uc "import base64,sys;
base64.encode(sys.stdin,sys.stdout)"<
"{eval:os.path.join("{indir={outdir}}","{imagesdir=}","{target}")}"}" /
</p>
{link#}</a>
</div>
<div class="title">{caption={figure-caption} {counter:figure-number}. }
{title}</div>
</div>
<img ...> are now included in<p>...</p>. It seems that there is now
visible change in the html file generated by asciidoc.
xhtml2odt is simple, does a good job, and is easy to install. "odt" is
missing in a2x output formats. What do you think about it?
An odt output option for a2x would be nice. Is there an Ubuntu of Debian package
for xhtml2odt?
The old bash based a2x had experimental support for odf via DocBook using
http://open.comsultia.com/docbook2odf/ but it had limitations and developement
seemed to have stalled.
Cheers, Stuart
Thank you for your attention.
david
--
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.