This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Problems centering images in html.
- From: Josef Karthauser <joe at tao dot org dot uk>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Tue, 05 Mar 2002 15:39:05 +0000
- Subject: Re: DOCBOOK-APPS: Problems centering images in html.
- References: <20020303204529.GA31502@genius.tao.org.uk>
--LQksG6bCIzRHxTLp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Did anyone have any thoughts on this, or should I try and fix the DSSSL
stylesheets myself? (A few others have mailed me privately to say that
this is a problem for them also).
Joe
On Sun, Mar 03, 2002 at 08:45:29PM +0000, Josef Karthauser wrote:
> Hi there,
>=20
> There appear to be some inconsistancies in the way that images are
> centered between the tex/pdf output and html output. (I'm using
> openjade and the 4.1 docbook and dsssl stylesheets).
>=20
> Here's an example:
>=20
> <sidebar>
> <para>
> <graphic align=3D"center" fileref=3D"some_image_file">
> Some text.
> </para>
> </sidebar>
>=20
> The tex/pdf output has the image centered as expected, but the html
> produced looks like this:
>=20
> <div class=3D"SIDEBAR">
> <a name=3D"AEN6"></a>
> <p align=3D"justify"></p>
> <p><img src=3D"some_image_file" align=3D"CENTER"></p>
> Some text
> <br>
> <br>
> </div>
>=20
> It should look like this:
>=20
> <div class=3D"SIDEBAR">
> <a name=3D"AEN6"></a>
> <p align=3D"justify"></p>
> <p align=3D"center"><img src=3D"some_image_file"></p>
> Some text
> <br>
> <br>
> </div>
>=20
> i.e. the align should be on the <p> element, not the <img> element.
>=20
> Is this easily fixed?
>=20
>=20
> Also the same is true of mediaobjects.
>=20
> <para>
> <mediaobject> <imageobject> <imagedata align=3D"center" fileref=3D"some_=
image_file">
> </imageobject> </mediaobject>
> </para>
>=20
> The html output is:
>=20
> <p align=3D"justify"><img src=3D"some_image_file" align=3D"CENTER"></=
p>
>=20
> Shouldn't this be:
>=20
> <p align=3D"center"><img src=3D"some_image_file"></p>
>=20
>=20
> Also if the media object is in a figure like:
>=20
> <para> <figure> <title> Some figure </title>
> <mediaobject> <imageobject> <imagedata align=3D"center" fileref=3D"so=
me_image_file">
> </imageobject> </mediaobject> </figure> </para>
>=20
> The html is:
>=20
> <div class=3D"FIGURE">
> <a name=3D"FIG2.1B"></a>
>=20
> <p><b>Figure 1-1. The origin is numerically zero</b></p>
> <img src=3D"chapter2/cartesian_frame_of_reference.png"
> align=3D"CENTER">
> </div>
>=20
> Shouldn't this be:
>=20
> <div class=3D"FIGURE">
> <a name=3D"FIG2.1B"></a>
>=20
> <p><b>Figure 1-1. The origin is numerically zero</b></p>
> <p align=3D"CENTER"><img src=3D"chapter2/cartesian_frame_of_reference.pn=
g"></p>
> </div>
>=20
>=20
> I'd be very grateful for hints to fix so, so that my html output is
> closer to the way that the pdfs render.
>=20
> Thanks,
> Joe
--LQksG6bCIzRHxTLp
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAjyE5pkACgkQXVIcjOaxUBYrYgCfbmbF1CvHLKa7z3CQFqLkRBtx
rm8AoJJSGSzaXigBEKfI/QTBXmk8sH8u
=d6dO
-----END PGP SIGNATURE-----
--LQksG6bCIzRHxTLp--