How to change default formatting for Figure Titles

View: New views
3 Messages — Rating Filter:   Alert me  

How to change default formatting for Figure Titles

by DeanNelson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
All
 
I have been using basic figures in the following manner:
 
- <figure>
      <title>This is a title</title>
      <graphic fileref="image.png" width="12cm" align="center" />
</figure>
 
However, when rendered though the Saxon 6.5.5/FOP 0.94  team the title is left aligned and the image is centered.
 
I would like to make sure that the TITLE alignment mirrors what the image alignment is. If I can't do that, I would like to change the default alignment for the figure titles.
 
Does anyone have a solution for these?
 
 
Thanks for  your help,

Dean Nelson

"Faith is acting before feeling." - Rick Warren




Start the year off right. Easy ways to stay in shape in the new year.

Re: How to change default formatting for Figure Titles

by Etienne Botha :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

DeanNelson wrote:
I would like to make sure that the TITLE alignment mirrors what the image  
alignment is. If I can't do that, I would like to change the default alignment  
for the figure titles.
DocBook FO XSL has an attribute set called "component.title.properties"  which you need to customize to include parent::figure in the test for text-align to be "center". Or you could get the value of the "align" attribute of the "graphic" child.

Re: How to change default formatting for Figure Titles

by Bob Stayton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You could also customize the template with match="figure" in fo/formal.xsl.
Oddly enough, the template for example elements peeks into the mediaobject
to get the align value and uses that for the title, but figure does not.  I
can't explain the difference.  But you could borrow the code from example to
customize your figure template.

Bob Stayton
Sagehill Enterprises
bobs@...


----- Original Message -----
From: "Etienne Botha" <etienne_botha@...>
To: <docbook-apps@...>
Sent: Monday, January 28, 2008 11:58 PM
Subject: Re: [docbook-apps] How to change default formatting for Figure
Titles


>
>
> DeanNelson wrote:
>>
>> I would like to make sure that the TITLE alignment mirrors what the image
>> alignment is. If I can't do that, I would like to change the default
>> alignment
>> for the figure titles.
>>
>
> DocBook FO XSL has an attribute set called "component.title.properties"
> which you need to customize to include parent::figure in the test for
> text-align to be "center". Or you could get the value of the "align"
> attribute of the "graphic" child.
>
> --
> View this message in context:
> http://www.nabble.com/How-to-change-default-formatting-for-Figure-Titles-tp15129230p15154232.html
> Sent from the docbook apps mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@...
> For additional commands, e-mail: docbook-apps-help@...
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@...
For additional commands, e-mail: docbook-apps-help@...