1<?xml version='1.0'?> 2<xsl:stylesheet 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:fo="http://www.w3.org/1999/XSL/Format" 5 version="1.0" 6> 7 8<!-- ************** FOP ************** --> 9<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/> 10<xsl:param name="fop1.extensions">1</xsl:param> 11<xsl:param name="sidebar.float.type">none</xsl:param> 12 13<!-- 14Make all hyperlinks blue colored: 15<xsl:attribute-set name="xref.properties"> 16 <xsl:attribute name="color">blue</xsl:attribute> 17</xsl:attribute-set> 18--> 19 20<!-- 21Put a box around admonishments and keep them together: 22--> 23<xsl:attribute-set name="graphical.admonition.properties"> 24 <xsl:attribute name="border-color">#FF8080</xsl:attribute> 25 <xsl:attribute name="border-width">1px</xsl:attribute> 26 <xsl:attribute name="border-style">solid</xsl:attribute> 27 <xsl:attribute name="padding-left">0.2cm</xsl:attribute> 28 <xsl:attribute name="padding-right">0.2cm</xsl:attribute> 29 <xsl:attribute name="padding-top">0.2cm</xsl:attribute> 30 <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute> 31 <xsl:attribute name="keep-together.within-page">1</xsl:attribute> 32 <xsl:attribute name="margin-left">0pt</xsl:attribute> 33 <xsl:attribute name="margin-right">0pt</xsl:attribute> 34</xsl:attribute-set> 35 36<!-- 37Put a box around code blocks, also set the font size 38and keep the block together if we can using the widows 39and orphans controls. Hyphenation and line wrapping 40is also turned on, so that long lines of code don't 41bleed off the edge of the page, a carriage return 42symbol is used as the hyphenation character: 43--> 44<xsl:attribute-set name="monospace.verbatim.properties"> 45 <xsl:attribute name="border-color">#DCDCDC</xsl:attribute> 46 <xsl:attribute name="border-width">1px</xsl:attribute> 47 <xsl:attribute name="border-style">solid</xsl:attribute> 48 <xsl:attribute name="padding-left">0.2cm</xsl:attribute> 49 <xsl:attribute name="padding-right">0.2cm</xsl:attribute> 50 <xsl:attribute name="padding-top">0.2cm</xsl:attribute> 51 <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute> 52 <xsl:attribute name="widows">6</xsl:attribute> 53 <xsl:attribute name="orphans">40</xsl:attribute> 54 <xsl:attribute name="font-size">9pt</xsl:attribute> 55 <xsl:attribute name="margin-left">0pt</xsl:attribute> 56 <xsl:attribute name="background-color">#EEEEEE</xsl:attribute> 57 <xsl:attribute name="margin-right">0pt</xsl:attribute> 58 <!-- 59 <xsl:attribute name="hyphenate">true</xsl:attribute> 60 <xsl:attribute name="wrap-option">wrap</xsl:attribute> 61 <xsl:attribute name="hyphenation-character">↵</xsl:attribute> 62 --> 63 <xsl:attribute name="hyphenate">false</xsl:attribute> 64 <xsl:attribute name="wrap-option">no-wrap</xsl:attribute> 65</xsl:attribute-set> 66 67<!--Regular monospace text should have the same font size as code blocks etc--> 68<xsl:attribute-set name="monospace.properties"> 69 <xsl:attribute name="font-size">9pt</xsl:attribute> 70</xsl:attribute-set> 71 72<!-- 73Put some small amount of padding around table cells, and keep tables 74together on one page if possible: 75--> 76<xsl:attribute-set name="table.cell.padding"> 77 <xsl:attribute name="padding-left">0.2cm</xsl:attribute> 78 <xsl:attribute name="padding-right">0.2cm</xsl:attribute> 79 <xsl:attribute name="padding-top">0.2cm</xsl:attribute> 80 <xsl:attribute name="padding-bottom">0.2cm</xsl:attribute> 81</xsl:attribute-set> 82 83<!--Formal and informal tables have the same properties--> 84<xsl:param name="table.frame.border.thickness">medium</xsl:param> 85<xsl:param name="table.cell.border.thickness">medium</xsl:param> 86<xsl:param name="table.frame.border.color">#DCDCDC</xsl:param> 87<xsl:param name="table.cell.border.color">#DCDCDC</xsl:param> 88 89<!--Formal and informal tables have the same properties 90Using widow-and-orphan control here gives much better 91results for very large tables than a simple "keep-together" 92instruction 93--> 94<xsl:attribute-set name="table.properties"> 95 <xsl:attribute name="keep-together.within-page">1</xsl:attribute> 96</xsl:attribute-set> 97<xsl:attribute-set name="informaltable.properties"> 98 <xsl:attribute name="keep-together.within-page">1</xsl:attribute> 99</xsl:attribute-set> 100 101<!-- 102General default options go here: 103* Borders are mid-grey. 104* Body text is not indented compared to the titles. 105* Page margins are a rather small 0.5in, but we need 106 all the space we can get for code blocks. 107* Paper size is A4: an ISO standard, slightly taller and narrower than US Letter. 108* Use SVG graphics for admonishments: the bitmaps look awful in PDF's. 109* Disable draft mode so we're not constantly trying to download the necessary graphic. 110* Set default image paths to pull down direct from SVN: individual Jamfiles can override this 111 and pass an absolute path to local versions of the images, but we can't get that here, so 112 we'll use SVN instead so that most things "just work". 113* don't spell out url's 114--> 115<xsl:param name="body.start.indent">0pt</xsl:param> 116<xsl:param name="admon.graphics">1</xsl:param> 117<xsl:param name="admon.graphics.extension">.svg</xsl:param> 118<xsl:param name="draft.mode">no</xsl:param> 119<xsl:param name="double.sided">0</xsl:param> 120<xsl:param name="show.bookmarks" select="1"></xsl:param> 121<xsl:param name="page.margin.inner">0.75in</xsl:param> 122<xsl:param name="page.margin.outer">0.75in</xsl:param> 123<xsl:param name="body.margin.top">0.50in</xsl:param> 124<xsl:param name="section.autolabel" select="1"></xsl:param> 125<xsl:param name="section.autolabel.max.depth">2</xsl:param> 126<xsl:param name="alignment">left</xsl:param> 127<xsl:param name="ulink.show">0</xsl:param> 128 129<xsl:param name="admon.graphics.path">http://svn.boost.org/svn/boost/trunk/doc/src/images/</xsl:param> 130<xsl:param name="callout.graphics.path">http://svn.boost.org/svn/boost/trunk/doc/src/images/callouts/</xsl:param> 131 132<!-- ******* Table of Contents ******** --> 133<xsl:param name="generate.toc"> 134/article title 135</xsl:param> 136<!-- How far down sections get TOC's --> 137<xsl:param name = "toc.section.depth" select="3" /> 138<!-- Max depth in each TOC: --> 139<xsl:param name = "toc.max.depth" select="3" /> 140<!-- How far down we go with TOC's --> 141<xsl:param name="generate.section.toc.level" select="0" /> 142<!-- Which elements should have which tables of contents --> 143 144<!-- ******* Chapter Titles ******* --> 145<xsl:param name="force.blank.pages" select="1"></xsl:param> 146 147<!-- 148<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> 149 <l:l10n language="en"> 150 <l:context name="title-numbered"> 151 <l:template name="chapter" text="%n. %t"/> 152 </l:context> 153 </l:l10n> 154</l:i18n> 155--> 156 157<xsl:attribute-set name="chapter.title.properties"> 158 <xsl:attribute name="font-family"> 159 <xsl:value-of select="$title.font.family"/> 160 </xsl:attribute> 161 <xsl:attribute name="font-weight">bold</xsl:attribute> 162 <!-- font size is added dynamically by section.heading template --> 163 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute> 164 <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute> 165 <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute> 166 <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute> 167 <xsl:attribute name="text-align">left</xsl:attribute> 168 <xsl:attribute name="start-indent">0pt</xsl:attribute> 169</xsl:attribute-set> 170 171<!-- ******* Section Level 5 properties ******* --> 172<!-- used by bridgeheads --> 173<xsl:attribute-set name="section.title.level5.properties"> 174 <xsl:attribute name="font-size"> 175 <xsl:value-of select="$body.font.master * 1.2"/> 176 <xsl:text>pt</xsl:text> 177 </xsl:attribute> 178</xsl:attribute-set> 179 180</xsl:stylesheet> 181