Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86784 - trunk/tools/boostbook/xsl
From: pbristow_at_[hidden]
Date: 2013-11-22 04:35:22


Author: pbristow
Date: 2013-11-22 04:35:22 EST (Fri, 22 Nov 2013)
New Revision: 86784
URL: http://svn.boost.org/trac/boost/changeset/86784

Log:
Added left, right, center, justify items to cater for role text alignment as for color needed for PDF.

Text files modified:
   trunk/tools/boostbook/xsl/fo.xsl | 33 +++++++++++++++++++++++++++++++++
   1 files changed, 33 insertions(+), 0 deletions(-)

Modified: trunk/tools/boostbook/xsl/fo.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/fo.xsl Thu Nov 21 23:00:54 2013 (r86783)
+++ trunk/tools/boostbook/xsl/fo.xsl 2013-11-22 04:35:22 EST (Fri, 22 Nov 2013) (r86784)
@@ -312,6 +312,39 @@
   </fo:inline>
 </xsl:template>
 
+<!-- alignment -->
+
+<xsl:template match="phrase[@role='aligncenter']">
+ <fo:inline>
+ <fo:block text-align="center">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='alignleft']">
+ <fo:inline>
+ <fo:block text-align="left">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='alignright']">
+ <fo:inline>
+ <fo:block text-align="right">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='alignjustify']">
+ <fo:inline>
+ <fo:block text-align="justify">
+ <xsl:apply-templates/>
+ </fo:block>
+ </fo:inline>
+</xsl:template>
 
   <!--
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk