click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r745148 - in /incubator/click/trunk/tools/docbook: build.xml src/styles/html/custom.xsl src/styles/pdf/custom.xsl
Date Tue, 17 Feb 2009 16:55:36 GMT
Author: sabob
Date: Tue Feb 17 16:55:35 2009
New Revision: 745148

URL: http://svn.apache.org/viewvc?rev=745148&view=rev
Log:
added extra docbook transformations

Modified:
    incubator/click/trunk/tools/docbook/build.xml
    incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl
    incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl

Modified: incubator/click/trunk/tools/docbook/build.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/build.xml?rev=745148&r1=745147&r2=745148&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/build.xml (original)
+++ incubator/click/trunk/tools/docbook/build.xml Tue Feb 17 16:55:35 2009
@@ -54,7 +54,7 @@
     </fail>
 
     <import file="${dbf.basedir}/build-docbook.xml"/>
-    
+
     <property name="docbook.dir" value="click"/>
     <property name="docbook.file" value="click-book"/>
 
@@ -80,17 +80,6 @@
 
         <delete quiet="true" dir="${target.dir}/${docbook.dir}/tmp"/>
 
-        <!--
-            Add IE Mark of the Web to each html page.
-            NB: The MARK_OF_THE_WEB comment must end with a newline!
-        -->
-        <replace dir="${target.dir}/${docbook.dir}">
-            <include name="**/*.html"/>
-            <replacetoken>&lt;!-- MARK_OF_THE_WEB --&gt;</replacetoken>
-            <replacevalue>&lt;!-- saved from url=(0014)about:internet --&gt;
-            </replacevalue>
-        </replace>
-    
     <!--<fixcrlf srcdir="target/click" includes="**/*.html" eol="crlf" /> -->
     </target>
 
@@ -123,6 +112,59 @@
             basedir="${src.dir}"
             fofile="${pdf.target.file}.xml"
             outfile="target/${docbook.dir}/pdf/${docbook.file}.pdf" />
+
+        <antcall target="postprocess"/>
+    </target>
+
+    <target name="html"
+            description="--> Generate HTML docs in multiple files">
+
+        <ant antfile="${dbf.basedir}/build-docbook.xml" target="html">
+            <property name="docbook.dir" value="${docbook.dir}"/>
+            <property name="docbook.file" value="${docbook.file}"/>
+        </ant>
+
+        <!--
+            Add IE Mark of the Web to each html page.
+            NB: The MARK_OF_THE_WEB comment must end with a newline!
+        -->
+        <replace dir="${target.dir}/${docbook.dir}">
+            <include name="**/html/*.html"/>
+            <replacetoken>&lt;!-- MARK_OF_THE_WEB --&gt;</replacetoken>
+            <replacevalue>&lt;!-- saved from url=(0014)about:internet --&gt;
+            </replacevalue>
+        </replace>
+
+        <antcall target="postprocess"/>
+
+    </target>
+
+    <target name="htmlsingle"
+            description="--> Generate HTML docs in a single, big file">
+
+        <ant antfile="${dbf.basedir}/build-docbook.xml" target="htmlsingle">
+            <property name="docbook.dir" value="${docbook.dir}"/>
+            <property name="docbook.file" value="${docbook.file}"/>
+        </ant>
+
+        <!--
+            Add IE Mark of the Web to each html page.
+            NB: The MARK_OF_THE_WEB comment must end with a newline!
+        -->
+        <replace dir="${target.dir}/${docbook.dir}">
+            <include name="**/htmlsingle/*.html"/>
+            <replacetoken>&lt;!-- MARK_OF_THE_WEB --&gt;</replacetoken>
+            <replacevalue>&lt;!-- saved from url=(0014)about:internet --&gt;
+            </replacevalue>
+        </replace>
+
+        <antcall target="postprocess"/>
+    </target>
+
+    <target name="postprocess">
+        <copy todir="${target.dir}/resources">
+            <fileset dir="${src.dir}/resources/"/>
+        </copy>
     </target>
 
   <!-- ======================================================================== -->

Modified: incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl?rev=745148&r1=745147&r2=745148&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl (original)
+++ incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl Tue Feb 17 16:55:35 2009
@@ -20,7 +20,11 @@
 -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:xslthl="http://xslthl.sf.net"
+                exclude-result-prefixes="xslthl"
                 version='1.0'>
+
   <xsl:param name="ulink.target">_blank</xsl:param>
 
 <!-- Activate Graphics -->
@@ -30,6 +34,7 @@
   <xsl:param name="callout.graphics" select="1" />
   <xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
   <xsl:param name="callout.graphics.extension">.gif</xsl:param>
+  <xsl:param name="ignore.image.scaling" select="1"></xsl:param>
 
   <xsl:param name="table.borders.with.css" select="1"/>
   <xsl:param name="html.stylesheet">css/stylesheet.css</xsl:param>
@@ -59,5 +64,88 @@
         <l:template name="section" text="%n&#160;%t"/>
       </l:context>
     </l:l10n>
-  </l:i18n>      
+  </l:i18n>
+
+  <!-- Override title heading to print <i> instead of <b> -->
+  <xsl:template name="formal.object.heading">
+    <xsl:param name="object" select="."/>
+    <xsl:param name="title">
+      <xsl:apply-templates select="$object" mode="object.title.markup">
+        <xsl:with-param name="allow-anchors" select="1"/>
+      </xsl:apply-templates>
+    </xsl:param>
+
+    <p class="title">
+      <i>
+        <xsl:copy-of select="$title"/>
+      </i>
+    </p>
+  </xsl:template>
+
+  <!-- Placement of titles -->
+  <xsl:param name="formal.title.placement">
+        figure after
+        example after
+        equation before
+        table before
+        procedure before
+  </xsl:param>
+
+  <!-- Remove callout column width. Default is 5% -->
+  <xsl:template match="callout">
+    <tr>
+      <xsl:call-template name="tr.attributes">
+        <xsl:with-param name="rownum">
+          <xsl:number from="calloutlist" count="callout"/>
+        </xsl:with-param>
+      </xsl:call-template>
+
+      <td valign="top" align="left">
+        <xsl:call-template name="anchor"/>
+        <xsl:call-template name="callout.arearefs">
+          <xsl:with-param name="arearefs" select="@arearefs"/>
+        </xsl:call-template>
+      </td>
+      <td valign="top" align="left">
+        <xsl:apply-templates/>
+      </td>
+    </tr>
+  </xsl:template>
+
+  <!-- For external links (<ulink>), set the class attribute to "external" -->
+  <xsl:template match="ulink" name="ulink">
+    <xsl:variable name="link">
+      <a>
+        <xsl:if test="@id">
+          <xsl:attribute name="name">
+            <xsl:value-of select="@id"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:attribute name="class">external</xsl:attribute>
+        <!--<xsl:attribute name="title">
+          <xsl:value-of select="@url"/>
+        </xsl:attribute>-->
+        <xsl:attribute name="href">
+          <xsl:value-of select="@url"/>
+        </xsl:attribute>
+        <xsl:if test="$ulink.target != ''">
+          <xsl:attribute name="target">
+            <xsl:value-of select="$ulink.target"/>
+          </xsl:attribute>
+        </xsl:if>
+        <xsl:choose>
+          <xsl:when test="count(child::node())=0">
+            <xsl:value-of select="@url"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </a>
+    </xsl:variable>
+
+    <xsl:copy-of select="$link"/>
+  </xsl:template>
+
+
 </xsl:stylesheet>

Modified: incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl?rev=745148&r1=745147&r2=745148&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl (original)
+++ incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl Tue Feb 17 16:55:35 2009
@@ -21,6 +21,8 @@
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xmlns:xslthl="http://xslthl.sf.net"
+                exclude-result-prefixes="xslthl"
                 version='1.0'>
 
   <!-- Use nice graphics for admonitions -->
@@ -43,122 +45,123 @@
     ################################################### -->
 
     <!-- More space in the center header for long text -->
-    <xsl:attribute-set name="header.content.properties">
-        <xsl:attribute name="font-family">
-            <xsl:value-of select="$body.font.family"/>
-        </xsl:attribute>
-        <xsl:attribute name="margin-left">-5em</xsl:attribute>
-        <xsl:attribute name="margin-right">-5em</xsl:attribute>
-    </xsl:attribute-set>
+  <xsl:attribute-set name="header.content.properties">
+    <xsl:attribute name="font-family">
+      <xsl:value-of select="$body.font.family"/>
+    </xsl:attribute>
+    <xsl:attribute name="margin-left">-5em</xsl:attribute>
+    <xsl:attribute name="margin-right">-5em</xsl:attribute>
+  </xsl:attribute-set>
 
 <!--###################################################
                       Table of Contents
     ################################################### -->
 
-    <xsl:param name="generate.toc">
+  <xsl:param name="generate.toc">
       book      toc,title
-    </xsl:param>
+  </xsl:param>
 
 <!--###################################################
                       Custom Footer
     ################################################### -->
 
-    <xsl:template name="footer.content">
-        <xsl:param name="pageclass" select="''"/>
-        <xsl:param name="sequence" select="''"/>
-        <xsl:param name="position" select="''"/>
-        <xsl:param name="gentext-key" select="''"/>
-
-        <xsl:variable name="Version">
-          <xsl:choose>
-            <xsl:when test="//productname">
-              <xsl:value-of select="//productname"/><xsl:text> </xsl:text>
-            </xsl:when>
-            <xsl:otherwise>
-              <xsl:text>please define productname in your docbook file!</xsl:text>
-            </xsl:otherwise>
-          </xsl:choose>
-
-          <xsl:choose>
-            <xsl:when test="//releaseinfo">
-              <xsl:value-of select="//releaseinfo"/>
-            </xsl:when>
-            <xsl:otherwise>
+  <xsl:template name="footer.content">
+    <xsl:param name="pageclass" select="''"/>
+    <xsl:param name="sequence" select="''"/>
+    <xsl:param name="position" select="''"/>
+    <xsl:param name="gentext-key" select="''"/>
+
+    <xsl:variable name="Version">
+      <xsl:choose>
+        <xsl:when test="//productname">
+          <xsl:value-of select="//productname"/>
+          <xsl:text> </xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>please define productname in your docbook file!</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+
+      <xsl:choose>
+        <xsl:when test="//releaseinfo">
+          <xsl:value-of select="//releaseinfo"/>
+        </xsl:when>
+        <xsl:otherwise>
                 <!-- nop -->
-            </xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
-
-        <xsl:variable name="Title">
-          <xsl:value-of select="//title"/>
-        </xsl:variable>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+
+    <xsl:variable name="Title">
+      <xsl:value-of select="//title"/>
+    </xsl:variable>
 
+    <xsl:choose>
+      <xsl:when test="$sequence='blank'">
         <xsl:choose>
-          <xsl:when test="$sequence='blank'">
-            <xsl:choose>
-              <xsl:when test="$double.sided != 0 and $position = 'left'">
-                <xsl:value-of select="$Version"/>
-              </xsl:when>
+          <xsl:when test="$double.sided != 0 and $position = 'left'">
+            <xsl:value-of select="$Version"/>
+          </xsl:when>
 
-              <xsl:when test="$double.sided = 0 and $position = 'center'">
+          <xsl:when test="$double.sided = 0 and $position = 'center'">
                 <!-- nop -->
-              </xsl:when>
-
-              <xsl:otherwise>
-                <fo:page-number/>
-              </xsl:otherwise>
-            </xsl:choose>
           </xsl:when>
 
-          <xsl:when test="$pageclass='titlepage'">
+          <xsl:otherwise>
+            <fo:page-number/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
+
+      <xsl:when test="$pageclass='titlepage'">
           <!-- nop: other titlepage sequences have no footer -->
-          </xsl:when>
+      </xsl:when>
 
-          <xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='left'">
-            <fo:page-number/>
-          </xsl:when>
+      <xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='left'">
+        <fo:page-number/>
+      </xsl:when>
 
-          <xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='right'">
-            <fo:page-number/>
-          </xsl:when>
+      <xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='right'">
+        <fo:page-number/>
+      </xsl:when>
 
-          <xsl:when test="$double.sided = 0 and $position='right'">
-           <fo:page-number/>
-          </xsl:when>
+      <xsl:when test="$double.sided = 0 and $position='right'">
+        <fo:page-number/>
+      </xsl:when>
 
-          <xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='left'">
-            <xsl:value-of select="$Version"/>
-          </xsl:when>
+      <xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='left'">
+        <xsl:value-of select="$Version"/>
+      </xsl:when>
 
-          <xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='right'">
-            <xsl:value-of select="$Version"/>
-          </xsl:when>
+      <xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='right'">
+        <xsl:value-of select="$Version"/>
+      </xsl:when>
 
-          <xsl:when test="$double.sided = 0 and $position='left'">
-            <xsl:value-of select="$Version"/>
-          </xsl:when>
+      <xsl:when test="$double.sided = 0 and $position='left'">
+        <xsl:value-of select="$Version"/>
+      </xsl:when>
 
-          <xsl:when test="$position='center'">
-            <xsl:value-of select="$Title"/>
-          </xsl:when>
+      <xsl:when test="$position='center'">
+        <xsl:value-of select="$Title"/>
+      </xsl:when>
 
-          <xsl:otherwise>
+      <xsl:otherwise>
           <!-- nop -->
-          </xsl:otherwise>
-        </xsl:choose>
-    </xsl:template>
-
-    <xsl:template match="processing-instruction('hard-pagebreak')">
-      <fo:block break-before='page'/>
-    </xsl:template>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="processing-instruction('hard-pagebreak')">
+    <fo:block break-before='page'/>
+  </xsl:template>
 
 <!--###################################################
                       Extensions
     ################################################### -->
 
     <!-- These extensions are required for table printing and other stuff -->
-    <xsl:param name="use.extensions">1</xsl:param>
-    <xsl:param name="tablecolumns.extension">0</xsl:param>
+  <xsl:param name="use.extensions">1</xsl:param>
+  <xsl:param name="tablecolumns.extension">0</xsl:param>
 
     <!-- CLICK FOP 0.95 CHANGES START -->
     <xsl:param name="fop1.extensions">1</xsl:param>
@@ -170,140 +173,140 @@
     ################################################### -->
 
     <!-- Paper type, no headers on blank pages, no double sided printing -->
-    <xsl:param name="double.sided">0</xsl:param>
-    <xsl:param name="headers.on.blank.pages">0</xsl:param>
-    <xsl:param name="footers.on.blank.pages">0</xsl:param>
+  <xsl:param name="double.sided">0</xsl:param>
+  <xsl:param name="headers.on.blank.pages">0</xsl:param>
+  <xsl:param name="footers.on.blank.pages">0</xsl:param>
 
 <!--###################################################
                    Fonts & Styles
     ################################################### -->
 
-    <xsl:param name="hyphenate">false</xsl:param>
+  <xsl:param name="hyphenate">false</xsl:param>
 
     <!-- Line height in body text -->
-    <xsl:param name="line-height">1.4</xsl:param>
+  <xsl:param name="line-height">1.4</xsl:param>
 
 <!--###################################################
                    Tables
     ################################################### -->
 
     <!-- Some padding inside tables -->
-    <xsl:attribute-set name="table.cell.padding">
-        <xsl:attribute name="padding-left">4pt</xsl:attribute>
-        <xsl:attribute name="padding-right">4pt</xsl:attribute>
-        <xsl:attribute name="padding-top">4pt</xsl:attribute>
-        <xsl:attribute name="padding-bottom">4pt</xsl:attribute>
-    </xsl:attribute-set>
+  <xsl:attribute-set name="table.cell.padding">
+    <xsl:attribute name="padding-left">4pt</xsl:attribute>
+    <xsl:attribute name="padding-right">4pt</xsl:attribute>
+    <xsl:attribute name="padding-top">4pt</xsl:attribute>
+    <xsl:attribute name="padding-bottom">4pt</xsl:attribute>
+  </xsl:attribute-set>
 
     <!-- Only hairlines as frame and cell borders in tables -->
-    <xsl:param name="table.frame.border.thickness">0.1pt</xsl:param>
-    <xsl:param name="table.cell.border.thickness">0.1pt</xsl:param>
+  <xsl:param name="table.frame.border.thickness">0.1pt</xsl:param>
+  <xsl:param name="table.cell.border.thickness">0.1pt</xsl:param>
 
 <!--###################################################
                          Labels
     ################################################### -->
 
     <!-- Label Chapters and Sections (numbering) -->
-    <xsl:param name="chapter.autolabel" select="1"/>
-    <xsl:param name="section.autolabel" select="1"/>
-    <xsl:param name="section.autolabel.max.depth" select="5"/>
-    <xsl:param name="toc.section.depth">5</xsl:param>
+  <xsl:param name="chapter.autolabel" select="1"/>
+  <xsl:param name="section.autolabel" select="1"/>
+  <xsl:param name="section.autolabel.max.depth" select="5"/>
+  <xsl:param name="toc.section.depth">5</xsl:param>
 
-    <xsl:param name="section.label.includes.component.label" select="1"/>
-    <xsl:param name="table.footnote.number.format" select="'1'"/>
+  <xsl:param name="section.label.includes.component.label" select="1"/>
+  <xsl:param name="table.footnote.number.format" select="'1'"/>
 
 <!--###################################################
                       Programlistings
     ################################################### -->
 
-    <xsl:attribute-set name="verbatim.properties">
-        <xsl:attribute name="space-before.minimum">1em</xsl:attribute>
-        <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
-        <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
+  <xsl:attribute-set name="verbatim.properties">
+    <xsl:attribute name="space-before.minimum">1em</xsl:attribute>
+    <xsl:attribute name="space-before.optimum">1em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
         <!-- alef: commented out because footnotes were screwed because of it -->
         <!--<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
         <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
         <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>-->
 
-        <xsl:attribute name="border-color">#444444</xsl:attribute>
-        <xsl:attribute name="border-style">solid</xsl:attribute>
-        <xsl:attribute name="border-width">0.1pt</xsl:attribute>
-        <xsl:attribute name="padding-top">0.5em</xsl:attribute>
-        <xsl:attribute name="padding-left">0.5em</xsl:attribute>
-        <xsl:attribute name="padding-right">0.5em</xsl:attribute>
-        <xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
-        <xsl:attribute name="margin-left">0.5em</xsl:attribute>
-        <xsl:attribute name="margin-right">0.5em</xsl:attribute>
+    <xsl:attribute name="border-color">#444444</xsl:attribute>
+    <xsl:attribute name="border-style">solid</xsl:attribute>
+    <xsl:attribute name="border-width">0.1pt</xsl:attribute>
+    <xsl:attribute name="padding-top">0.5em</xsl:attribute>
+    <xsl:attribute name="padding-left">0.5em</xsl:attribute>
+    <xsl:attribute name="padding-right">0.5em</xsl:attribute>
+    <xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
+    <xsl:attribute name="margin-left">0.5em</xsl:attribute>
+    <xsl:attribute name="margin-right">0.5em</xsl:attribute>
         <!-- CLICK FONT CHANGES START -->
-        <xsl:attribute name="font-size">8pt</xsl:attribute>
+    <xsl:attribute name="font-size">8pt</xsl:attribute>
         <!-- CLICK FONT CHANGES END -->
-    </xsl:attribute-set>
+  </xsl:attribute-set>
 
     <!-- Shade (background) programlistings -->
-    <xsl:param name="shade.verbatim">1</xsl:param>
-    <xsl:attribute-set name="shade.verbatim.style">
-        <xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
-    </xsl:attribute-set>
-
-    <xsl:attribute-set name="list.block.spacing">
-      <xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
-      <xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
-      <xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
-      <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
-      <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
-      <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
-    </xsl:attribute-set>
-
-    <xsl:attribute-set name="example.properties">
-      <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
-      <xsl:attribute name="space-before.optimum">0.5em</xsl:attribute>
-      <xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
-      <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
-      <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
-      <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
-      <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
-    </xsl:attribute-set>
+  <xsl:param name="shade.verbatim">1</xsl:param>
+  <xsl:attribute-set name="shade.verbatim.style">
+    <xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
+  </xsl:attribute-set>
+
+  <xsl:attribute-set name="list.block.spacing">
+    <xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+  </xsl:attribute-set>
+
+  <xsl:attribute-set name="example.properties">
+    <xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
+    <xsl:attribute name="space-before.optimum">0.5em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
+    <xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
+    <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
+  </xsl:attribute-set>
 
 <!--###################################################
         Title information for Figures, Examples etc.
     ################################################### -->
 
-    <xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
-      <xsl:attribute name="font-weight">normal</xsl:attribute>
-      <xsl:attribute name="font-style">italic</xsl:attribute>
-      <xsl:attribute name="font-size">
-        <xsl:value-of select="$body.font.master"/>
-        <xsl:text>pt</xsl:text>
-      </xsl:attribute>
-      <xsl:attribute name="hyphenate">false</xsl:attribute>
-      <xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
-      <xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
-      <xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
-    </xsl:attribute-set>
+  <xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
+    <xsl:attribute name="font-weight">normal</xsl:attribute>
+    <xsl:attribute name="font-style">italic</xsl:attribute>
+    <xsl:attribute name="font-size">
+      <xsl:value-of select="$body.font.master"/>
+      <xsl:text>pt</xsl:text>
+    </xsl:attribute>
+    <xsl:attribute name="hyphenate">false</xsl:attribute>
+    <xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
+    <xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
+  </xsl:attribute-set>
 
 <!--###################################################
                          Callouts
     ################################################### -->
 
     <!-- don't use images for callouts -->
-    <xsl:param name="callout.graphics">0</xsl:param>
-    <xsl:param name="callout.unicode">1</xsl:param>
+  <xsl:param name="callout.graphics">0</xsl:param>
+  <xsl:param name="callout.unicode">1</xsl:param>
 
     <!-- Place callout marks at this column in annotated areas -->
-    <xsl:param name="callout.defaultcolumn">90</xsl:param>
+  <xsl:param name="callout.defaultcolumn">90</xsl:param>
 
 <!--###################################################
                           Misc
     ################################################### -->
 
     <!-- Placement of titles -->
-    <xsl:param name="formal.title.placement">
+  <xsl:param name="formal.title.placement">
         figure after
         example after
         equation before
         table before
         procedure before
-    </xsl:param>
+  </xsl:param>
 
   <!-- Format Variable Lists as Blocks (prevents horizontal overflow) -->
   <xsl:param name="variablelist.as.blocks">1</xsl:param>
@@ -323,4 +326,55 @@
       </l:context>
     </l:l10n>
   </l:i18n>
+
+  <!-- Hide the URLs of external links (<ulink>) -->
+  <xsl:param name="ulink.show" select="0"></xsl:param>
+
+  <!-- Add page numbers to bookmarks (<link>) -->
+  <xsl:param name="insert.link.page.number">yes</xsl:param>
+
+  <!-- Underline hyperlinks and set <ulink> color to blue -->
+  <xsl:attribute-set name="xref.properties">
+    <xsl:attribute name="text-decoration">underline</xsl:attribute>
+    <xsl:attribute name="color">
+      <xsl:choose>
+        <xsl:when test="self::ulink">blue</xsl:when>
+        <xsl:otherwise>inherit</xsl:otherwise>
+      </xsl:choose>
+    </xsl:attribute>
+  </xsl:attribute-set>
+
+  <!-- Set table header font color to white -->
+  <xsl:template name="table.cell.block.properties">
+    <xsl:if test="ancestor::thead">
+      <xsl:attribute name="font-weight">bold</xsl:attribute>
+      <xsl:attribute name="color">white</xsl:attribute>
+    </xsl:if>
+  </xsl:template>
+
+  <!-- Customize some properties for "symbol", "varname", "command" and "token" -->
+  <xsl:template match="symbol">
+    <fo:inline color="red">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match="command">
+    <fo:inline font-weight="bold" color="#7F0055">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match="token">
+    <fo:inline color="maroon">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match="varname">
+    <fo:inline color="blue">
+      <xsl:apply-templates/>
+    </fo:inline>
+  </xsl:template>
+
 </xsl:stylesheet>



Mime
View raw message