referencing image files in docbook
Sean Champ <[email protected]>
| Newsgroups | gmane.text.refdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, while putting RefDB into some debian packages (more info about this should be forthcoming, after I get the packaging worked-out), I was building the sgml manual from source, and I noticed a problem with how the sgml 'figure' elements were being translated into html. I'm not sure what was used to build the html manual that you have online , but with the docbook-utils and docbook-dsssl-stylesheets on my debian/sid box, this wasn't handled as I think it was expected to be, in the html DSSSL stylesheets: <figure float="0" id="figure-threetier"> <title>&appname; three-tier architecture</title> <graphic fileref="refdbmanualfig1"></graphic> </figure> Given a file name with no extension, in the graphic/@fileref, it uses exactly that in the final HTML: <img src="refdbmanualfig1"> It worked-out alright with the postcript output, though, even so. Now, when it's done like this, it works out alright in the html, and the postscript, both: <figure float="0" id="figure-threetier"> <title>&appname; three-tier architecture</title> <mediaobject> <imageobject> <imagedata fileref="refdbmanualfig1.png"> </imageobject> <imageobject> <imagedata fileref="refdbmanualfig1.eps" format="EPS"> </imageobject> </mediaobject> </figure> the format="" attribute may be optional, but it's bettter to include it and not leave the processor guessing. It can't very well be included for the png file, though, when using the docbook 3.1 dtd -- docbook 3.1, apparently, has no 'token' (?) definition for PNG (docbook 4.2 does, though). Still, it looks right in the output, when giving the exact *.png and *.eps filenames -- for the html, the foo.png file is used instead of the foo.eps, and the foo.eps one is still used when generating the postscript (and, if i understand the docbook-utils correctly, the eps would be used for the pdf too, effectively. AFAIK, docbook2pdf just makes the postscript into pdf) [too, the order of file-type preference can be set in /usr/share/sgml/docbook/utils-0.6.13/docbook-utils.dsl ... that's where it is on my box ... by modifying the varaibles `preferred-mediaobject-extensions' and `acceptable-mediaobject-extensions', for the respective PRINT and HTML sections. It looks like it comes with some reasonable defaults, though.] So, if this makes sense, I could go through and edit the *.sgml files that have 'figure' elements, and maybe even change the doctype declarations for all the files, for using docbook 4.2, and submit a diff. (Otherwise, I'll end up keeping a diff anyway, heh, for the debian packages) sounds reasonable? thanks, -- sean champ ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf