Re: [docbook-apps] Menu arrow off-centered in PDF

From
Bob Stayton <>
Date
2012-03-27T17:03:46+00:00
ID
026e01cd0c3b$8e2fbf30$6600a8c0@pazu
Thread
Re: [docbook-apps] Menu arrow off-centered in PDF
Title: Menu arrow off-centered in PDF

Hi Jeff,

Just to be clear here, your example shows an ASCII 
representation of an arrow using dash and greater-than, but you are getting an 
actual arrow character, right?

 

Yes, the bottom of the arrow character does rest on 
the baseline, because the stylesheet does not say otherwise.  That 
character is copied from the stylesheet param "menuchoice.menu.separator", whose 
default value is:

 

  <xsl:param 
name="menuchoice.menu.separator"> &#8594; </xsl:param>

 

Since the stylesheet uses xsl:copy on that param, 
you could customize it by putting an fo:inline to adjust the 
baseline:

 

  <xsl:param 
name="menuchoice.menu.separator"> <fo:inline 
baseline-shift=".2em">&#8594;</fo:inline> 
</xsl:param>

 

or some other XSL-FO property to adjust its 
baseline.  I'm not sure what property you would use to get it to be 
"centered with the text".

 

Bob Stayton
Sagehill Enterprises


 

 

  
----- Original Message ----- 

  
From: 
  Jeff Storey 

  
To:  
  

  
Sent: Monday, March 26, 2012 5:48 
PM

  
Subject: [docbook-apps] Menu arrow 
  off-centered in PDF

  

  
My docbook has some menuchoice that look 
  like:

   
  <menuchoice><guimenuitem>Import</guimenuitem><guimenuitem>Import 
  Image</guimenuitem></menuchoice>

As expected, in my PDF it 
  says: Import -> Import Image

However, the arrow is not centered with 
  the text. It looks like the arrow is along the baseline of the text. Is this 
  expected?

thanks,
Jeff