OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Centering tables and mediaobjects


There is no parameter or attribute-set that will center mediaobjects in
DocBook's XSL-FO output.  However, if you put your mediaobjects inside
informalfigure, you can use this:

<xsl:attribute-set name="informalfigure.properties">
  <xsl:attribute name="text-align">center</xsl:attribute>
</xsl:attribute-set>

You can do the same with "figure.properties" if you are using figure
instead.

You can align individual mediaobject elements by putting an align="center"
attribute on the imagedata element inside the mediaobject.  But you were
looking for a global solution.  You could also customize the template that
matches mediaobject to use an attribute-set, and then put the property in
the attribute-set.

Tables are a different matter in XSL-FO.  Oddly enough, the text-align
property is not allowed on fo:table, but it is on fo:table-and-caption.  But
the DocBook XSL stylesheet doesn't output a table-and-caption element for
this purpose because FOP doesn't support table-and-caption, and XEP doesn't
support the text-align property on it.  Only Antenna House works to center a
table inside a table-and-caption element.

There is a workaround in XSL-FO, which involves creating an outer one-row
table with your table contained in the center cell.  But the DocBook
stylesheets don't do that.  See this reference if you want to customize
tables to do this:

http://www.renderx.net/lists/xep-support/1444.html

It is kind of amazing that something that seems like it should be so simple
is so complicated.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Jens Skripczynski" <skripi-lists@myrealbox.com>
To: "Michal Duda" <duda.michal@centrum.cz>
Cc: <docbook-apps@lists.oasis-open.org>
Sent: Thursday, March 17, 2005 4:08 PM
Subject: Re: [docbook-apps] Centering tables and mediaobjects


> Michal Duda:
> > Hello,
> >
> > I'd like to get all tables and mediaobjects positions in the center of
the
> > page (HTML and FO). Is there some parameters for this purpose?
> Well html is not a page centric layout thing.
> You can specify the html display via a css style sheet (Hoping, that
> all Browsers support the CSS spec, which may be tricky).
>
> For Fo, I belieft you use the css attributes as well, but in the generated
fo
> file.
>
> I think Bob Stayton can help you on this, have you tried his guide ?
>
>
> Ciao
>
> Jens Skripczynski
> -- 
> E-Mail: skripi-lists(at)myrealbox(dot)com
>
> "God, root, what is difference?" -- Pitr, User Friendly;
> "God is more forgiving."         -- Dave Aronson
>
>
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]