db2fo.xsl 7.2 KB

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