docbook 2 html with images
Éric Bischoff
ebischoff@nerim.net
Sun Feb 5 08:47:00 GMT 2006
Le Samedi 4 Février 2006 23:07, JT Moree a écrit :
> > For example, at my place, they are in images/ ...
>
> Does your docbook link to them with the 'images' in the path?
I suppose it has to reference them somehow, yes, otherwise how would the
rendering engine calculate the images size for example for PDF output ?
> In my case the Blender guide is not just referring to images but images
> under subdirectories so that the src looks like
> src="boo/bar/baz/image.png" in the resulting html. the original docbook
> files use
> ref="boo/bar/baz/image.png" format="png"
Yes, you could base your algorithm on the path in the docbook source.
Beware it could be something vicious like "../../images/", in which case it
might not be obvious to convert that to a HTML path and copy the files.
Example to show you why this could reasonably happen
(use fixed font to display) :
project/
+------ images/
| +----- illustration.png
|
+------ part 1/
| +------ chapter1/
| | +-------- myfile.docbook
| |
| +------ chapter 2/
It could also be an absolute path, it is not necessarily a relative path.
> > You would at least need to pass a parameter like --images-dir to your
> > script. That could default to ".".
>
> That's fine but I'm not sure that it makes sense. How could the docbook
> stuff use images from anywhere without specifiying where that is in the
> ref tag?
Correct.
> And if it is specified it results in an <img src= after conversion to html?
> And if it can be found by the docbook stuff why wouldn't it be findable
> by the html conversion stuff and my utility as well?
If you find a valuable algorithm, I have nothing against, on the contrary, it
would really be a *great* plus for the docbook-utils.
I just wanted to stress that the source images could be anywhere. You will
have to think a lot about that in your algorithm. In fact, it's what has
always prevented me from coding that...
--
George W. Bush mentions "liberty" in every speech he does. But today, the USA
exports war, torture, humiliation, secret prisons, arbitrary detention
without any judgement, and telephone tapping. That has very little to do with
freedom.
More information about the Docbook-tools-discuss
mailing list