db2fo.xsl 7.4 KB

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