referencing image files in docbook
"Markus Hoenicka" <[email protected]>
| Newsgroups | gmane.text.refdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Sean Champ writes: > > 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. > I'm using mean tricks, of course ;-). I use driver files for both the html and printed output to make it look a little nicer. The html driver file sets the default image extension to .png, among other things. Please find the driver files attached below. > > 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). > This is going to work. The only drawback (if there is one) is that you can't switch over all images to a different format without editing the sources. > 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) > > Basically I don't mind if you want to send the patches. I guess working with driver files is not trivial with the docbook-utils, is it? If not, your way of hardcoding may be preferable. Switching over to 4.2 is ok anyway. I was just too lazy to do this yet. BTW if you're serious about packaging, we should coordinate this effort a little. E.g. the last official release is quite buggy. All these problems have been fixed in a 0.9.4-pre1 prerelease which would be a better candidate for packaging. And let me know if you run into other problems. I'll be happy to lend a hand. regards, Markus -- Markus Hoenicka [email protected] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de
docbook.dsl
(application/octet-stream, 3.6 KB) - not displayed
docbook.dsl
(application/octet-stream, 658 B) - not displayed
docbook-pdf.dsl
(application/octet-stream, 658 B) - not displayed