Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86229 - trunk/tools/boostbook/xsl
From: pbristow_at_[hidden]
Date: 2013-10-10 11:40:07


Author: pbristow
Date: 2013-10-10 11:40:07 EDT (Thu, 10 Oct 2013)
New Revision: 86229
URL: http://svn.boost.org/trac/boost/changeset/86229

Log:
Additions to implement colors from Quickbook 1.6.

But align feature (done in boostbook.css for html) is still not implemented.

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

Modified: trunk/tools/boostbook/xsl/fo.xsl
==============================================================================
--- trunk/tools/boostbook/xsl/fo.xsl Thu Oct 10 11:33:45 2013 (r86228)
+++ trunk/tools/boostbook/xsl/fo.xsl 2013-10-10 11:40:07 EDT (Thu, 10 Oct 2013) (r86229)
@@ -216,13 +216,105 @@
       </xsl:choose>
     </fo:list-item-label>
     <fo:list-item-body start-indent="body-start()">
- <xsl:apply-templates select="*[local-name(.)!='label']"/>
+ <xsl:apply-templates select="*[local-name(.)!='label']"/>text-align
     </fo:list-item-body>
   </fo:list-item>
 </xsl:template>
 
+
 <!--
 
+ The following rules apply text coloring to Quickbook items like
+
+ [role blue Some blue text]
+
+ These correspond to an arbitrary list of colors added to the CSS file
+
+ $(BOOST-ROOT)\doc\src\boostbook.css
+
+ and are required for building pdf documentation.
+
+ A more elegant way of doing this is probably possible.
+ Other colors can be added simply by copying these examples.
+-->
+
+<xsl:template match="phrase[@role='red']">
+ <fo:inline color="red">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='blue']">
+ <fo:inline color="blue">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='green']">
+ <fo:inline color="green">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='lime']">
+ <fo:inline color="lime">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='navy']">
+ <fo:inline color="navy">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='yellow']">
+ <fo:inline color="yellow">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+<xsl:template match="phrase[@role='magenta']">
+ <fo:inline color="magenta">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='indigo']">
+ <fo:inline color="indigo">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='cyan']">
+ <fo:inline color="cyan">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='purple']">
+ <fo:inline color="purple">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='gold']">
+ <fo:inline color="gold">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='silver']">
+ <fo:inline color="silver">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+<xsl:template match="phrase[@role='gray']">
+ <fo:inline color="gray">
+ <xsl:apply-templates/>
+ </fo:inline>
+</xsl:template>
+
+
+ <!--
+
  The following rules apply syntax highlighting to phrases
  that have been appropriately marked up, the highlighting
  used is the same as that used by our CSS style sheets,


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