/usr/share/boostbook/xsl/fo.xsl is in libboost1.46-dev 1.46.1-7ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | <?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2003 Douglas Gregor -->
<!-- Distributed under the Boost Software License, Version 1.0. -->
<!-- (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<!-- Import the FO stylesheet -->
<xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
<xsl:param name="chapter.autolabel" select="0"/>
<xsl:param name="refentry.generate.name" select="0"/>
<xsl:param name="refentry.generate.title" select="1"/>
<xsl:param name="fop1.extensions" select="1"/>
<xsl:param name="make.year.ranges" select="1"/>
<xsl:param name="ulink.show" select="0"/>
<!-- The question and answer templates are copied here from the
1.61.3 DocBook XSL stylesheets so that we can eliminate the emission
of id attributes in the emitted fo:list-item-label elements. FOP
0.20.5 has problems with these id attributes, and they are otherwise
unused. -->
<xsl:template match="question">
<xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
<xsl:variable name="entry.id">
<xsl:call-template name="object.id">
<xsl:with-param name="object" select="parent::*"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="deflabel">
<xsl:choose>
<xsl:when test="ancestor-or-self::*[@defaultlabel]">
<xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
/@defaultlabel"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$qanda.defaultlabel"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:list-item id="{$entry.id}" xsl:use-attribute-sets="list.item.spacing">
<fo:list-item-label end-indent="label-end()">
<xsl:choose>
<xsl:when test="$deflabel = 'none'">
<fo:block/>
</xsl:when>
<xsl:otherwise>
<fo:block>
<xsl:apply-templates select="." mode="label.markup"/>
<xsl:text>.</xsl:text> <!-- FIXME: Hack!!! This should be in the locale! -->
</fo:block>
</xsl:otherwise>
</xsl:choose>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<xsl:choose>
<xsl:when test="$deflabel = 'none'">
<fo:block font-weight="bold">
<xsl:apply-templates select="*[local-name(.)!='label']"/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="*[local-name(.)!='label']"/>
</xsl:otherwise>
</xsl:choose>
</fo:list-item-body>
</fo:list-item>
</xsl:template>
<xsl:template match="answer">
<xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
<xsl:variable name="entry.id">
<xsl:call-template name="object.id">
<xsl:with-param name="object" select="parent::*"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="deflabel">
<xsl:choose>
<xsl:when test="ancestor-or-self::*[@defaultlabel]">
<xsl:value-of select="(ancestor-or-self::*[@defaultlabel])[last()]
/@defaultlabel"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$qanda.defaultlabel"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:list-item xsl:use-attribute-sets="list.item.spacing">
<fo:list-item-label end-indent="label-end()">
<xsl:choose>
<xsl:when test="$deflabel = 'none'">
<fo:block/>
</xsl:when>
<xsl:otherwise>
<fo:block>
<!-- FIXME: Hack!!! This should be in the locale! -->
<xsl:variable name="answer.label">
<xsl:apply-templates select="." mode="label.markup"/>
</xsl:variable>
<xsl:copy-of select="$answer.label"/>
<xsl:if test="string($answer.label) != ''">
<xsl:text>.</xsl:text>
</xsl:if>
</fo:block>
</xsl:otherwise>
</xsl:choose>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<xsl:apply-templates select="*[local-name(.)!='label']"/>
</fo:list-item-body>
</fo:list-item>
</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,
but potentially we have the option to do better here
since we can add bold and italic formatting quite easily
-->
<xsl:template match="//phrase[@role='keyword' and
(ancestor::programlisting or
ancestor::synopsis or
ancestor::literallayout)]">
<fo:inline color="#0000AA"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match="//phrase[@role='special' and
(ancestor::programlisting or
ancestor::synopsis or
ancestor::literallayout)]">
<fo:inline color="#707070"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match="//phrase[@role='preprocessor' and
(ancestor::programlisting or
ancestor::synopsis or
ancestor::literallayout)]">
<fo:inline color="#402080"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match="//phrase[@role='char' and
(ancestor::programlisting or
ancestor::synopsis or
ancestor::literallayout)]">
<fo:inline color="teal"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match="//phrase[@role='comment' and
(ancestor::programlisting or
ancestor::synopsis or
ancestor::literallayout)]">
<fo:inline color="#800000"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match="//phrase[@role='string' and
(ancestor::programlisting or
ancestor::synopsis or
ancestor::literallayout)]">
<fo:inline color="teal"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match="//phrase[@role='number' and
(ancestor::programlisting or
ancestor::synopsis or
ancestor::literallayout)]">
<fo:inline color="teal"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match="//phrase[@role='white_bkd' and
(ancestor::programlisting or
ancestor::synopsis or
ancestor::literallayout)]">
<fo:inline color="#FFFFFF"><xsl:apply-templates/></fo:inline>
</xsl:template>
<xsl:template match="//phrase[@role='dk_grey_bkd' and
(ancestor::programlisting or
ancestor::synopsis or
ancestor::literallayout)]">
<fo:inline color="#999999"><xsl:apply-templates/></fo:inline>
</xsl:template>
<!--
Make all hyperlinks blue colored:
-->
<xsl:attribute-set name="xref.properties">
<xsl:attribute name="color">blue</xsl:attribute>
</xsl:attribute-set>
<!--
Put a box around admonishments and keep them together:
-->
<xsl:attribute-set name="graphical.admonition.properties">
<xsl:attribute name="border-color">#FF8080</xsl:attribute>
<xsl:attribute name="border-width">1px</xsl:attribute>
<xsl:attribute name="border-style">solid</xsl:attribute>
<xsl:attribute name="padding-left">0.2cm</xsl:attribute>
<xsl:attribute name="padding-right">0.2cm</xsl:attribute>
<xsl:attribute name="padding-top">0.2cm</xsl:attribute>
<xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
<xsl:attribute name="keep-together.within-page">1</xsl:attribute>
<xsl:attribute name="margin-left">0pt</xsl:attribute>
<xsl:attribute name="margin-right">0pt</xsl:attribute>
</xsl:attribute-set>
<!--
Put a box around code blocks, also set the font size
and keep the block together if we can using the widows
and orphans controls. Hyphenation and line wrapping
is also turned on, so that long lines of code don't
bleed off the edge of the page, a carriage return
symbol is used as the hyphenation character:
-->
<xsl:attribute-set name="monospace.verbatim.properties">
<xsl:attribute name="border-color">#DCDCDC</xsl:attribute>
<xsl:attribute name="border-width">1px</xsl:attribute>
<xsl:attribute name="border-style">solid</xsl:attribute>
<xsl:attribute name="padding-left">0.2cm</xsl:attribute>
<xsl:attribute name="padding-right">0.2cm</xsl:attribute>
<xsl:attribute name="padding-top">0.2cm</xsl:attribute>
<xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
<xsl:attribute name="widows">6</xsl:attribute>
<xsl:attribute name="orphans">40</xsl:attribute>
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="hyphenate">true</xsl:attribute>
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
<xsl:attribute name="hyphenation-character">↵</xsl:attribute>
<xsl:attribute name="margin-left">0pt</xsl:attribute>
<xsl:attribute name="margin-right">0pt</xsl:attribute>
</xsl:attribute-set>
<xsl:param name="hyphenate.verbatim" select="1"></xsl:param>
<xsl:param name="monospace.font.family">monospace,Symbol</xsl:param>
<!--Regular monospace text should have the same font size as code blocks etc-->
<xsl:attribute-set name="monospace.properties">
<xsl:attribute name="font-size">9pt</xsl:attribute>
</xsl:attribute-set>
<!--
Put some small amount of padding around table cells, and keep tables
together on one page if possible:
-->
<xsl:attribute-set name="table.cell.padding">
<xsl:attribute name="padding-left">0.2cm</xsl:attribute>
<xsl:attribute name="padding-right">0.2cm</xsl:attribute>
<xsl:attribute name="padding-top">0.2cm</xsl:attribute>
<xsl:attribute name="padding-bottom">0.2cm</xsl:attribute>
</xsl:attribute-set>
<!--Formal and informal tables have the same properties
Using widow-and-orphan control here gives much better
results for very large tables than a simple "keep-together"
instruction-->
<xsl:attribute-set name="table.properties">
<xsl:attribute name="keep-together.within-page">1</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="informaltable.properties">
<xsl:attribute name="keep-together.within-page">1</xsl:attribute>
</xsl:attribute-set>
<!--
General default options go here:
* Borders are mid-grey.
* Body text is not indented compared to the titles.
* Page margins are a rather small 0.5in, but we need
all the space we can get for code blocks.
* Paper size is A4: an ISO standard, and just slightly smaller than US Letter.
* Use SVG graphics for admonishments: the bitmaps look awful in PDF's.
* Disable draft mode so we're not constantly trying to download the necessary graphic.
* Set default image paths to pull down direct from SVN: individual Jamfiles can override this
and pass an absolute path to local versions of the images, but we can't get that here, so
we'll use SVN instead so that most things "just work".
-->
<xsl:param name="table.frame.border.color">#DCDCDC</xsl:param>
<xsl:param name="table.cell.border.color">#DCDCDC</xsl:param>
<xsl:param name="body.start.indent">0pt</xsl:param>
<xsl:param name="page.margin.inner">0.5in</xsl:param>
<xsl:param name="page.margin.outer">0.5in</xsl:param>
<xsl:param name="paper.type">A4</xsl:param>
<xsl:param name="admon.graphics">1</xsl:param>
<xsl:param name="admon.graphics.extension">.svg</xsl:param>
<xsl:param name="draft.mode">no</xsl:param>
<xsl:param name="admon.graphics.path">http://svn.boost.org/svn/boost/trunk/doc/src/images/</xsl:param>
<xsl:param name="callout.graphics.path">http://svn.boost.org/svn/boost/trunk/doc/src/images/callouts/</xsl:param>
<xsl:param name="img.src.path">http://svn.boost.org/svn/boost/trunk/doc/html/</xsl:param>
<!-- Ideally we would use this to force top level sections
to start on a new page, unfortunately this causes rather
unfortunate page breaks in some Doxygen-generated
documentation which uses <refentry> and <synopsis>
sections :-(
<xsl:attribute-set name="section.level1.properties">
<xsl:attribute name="break-before">page</xsl:attribute>
</xsl:attribute-set>
-->
</xsl:stylesheet>
|