This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Problem with centering images using DSSSLstylesheets?
- To: Nik Clayton <nik at nothing-going-on dot demon dot co dot uk>
- Subject: Re: DOCBOOK-APPS: Problem with centering images using DSSSLstylesheets?
- From: Dan York <dyork at e-smith dot com>
- Date: Thu, 22 Feb 2001 17:34:03 -0500
- Cc: docbook-apps at lists dot oasis-open dot org, nwalsh at nwalsh dot com
- Organization: e-smith, Inc.
- References: <20010221174651.B20763@e-smith.com><20010222175249.A41697@canyon.nothing-going-on.org>
Nik,
Many thanks for the suggestions! I spent some time looking at the pieces
you mentioned.
It appears that this is one big difference between the 'html' and 'print'
stylesheets:
> 4. "(element imagedata ... )" can look at the ImageData attributes,
> and do appropriate things with the Align attribute. But at this
> point we're too late.
in 'html/db31.dsl', (element imagedata ...) does a great amount of work.
In 'print/db31.dsl', all it is is this:
(element imagedata
($img$))
where $img$ is defined in 'print/dbgraph.dsl'.
Interestingly, $img$ is *also* defined in 'html/dbgraph.dsl' where it
appears that if 'fileref' is defined, control will be passed to:
($graphic$ fileref format alt align)
which appears above that, and, to my untrained eye, seems like it would
generate the appropriate IMG tag.
Now, over on the print side, in 'print/dbgraph.dsl', $img$ winds up
doing almost the same thing:
($graphic$ fileref display format scale align)
Above that, in $graphic$ there is a conditional statement where it is
checking the alignment and assigning the end value to 'graphic-align'.
Just for fun, and because I happen to want *all* images in the manual
centered, I commented out the entire conditional statement for
(graphic-align (cond....)), which spanned 6 lines, and replaced it
with:
(graphic-align 'center))
which worked! Sort of... bizarrely 4 of the 175 images *were* centered!
The first image was NOT, but the next 4 were. All images after that
were not. In looking through it, I could not discern any pattern to it
or any reason *why* those particular graphics might be centered and others
not. There is no discernable difference between how I coded any of them
in DocBook! It's truly a puzzle to me.
If anyone wants to see what I'm talking about, the PDF file is at:
http://www.e-smith.org/docs/manual/4.1/userguide.pdf
and the DocBook file is at:
http://www.e-smith.org/docs/manual/4.1/userguide.sgml
As I mentioned in my previous post, I'm using Norm's 1.62 DSSSL stylesheets
and openjade 1.3 (with sgml2x as a front-end for openjade).
Any other ideas will be *greatly* appreciated! (I'm working on the print
end because we have to get a PDF file to the printer... oh... yesterday!)
Thanks,
Dan
------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org