pdf.xsl 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version='1.0' encoding='ISO-8859-1'?>
  2. <!--
  3. $LastChangedBy$
  4. $Date$
  5. -->
  6. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  7. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  8. version="1.0">
  9. <!-- Stylesheet for FO output used to generate PDF
  10. Sets global params and include customization stylesheets. -->
  11. <!-- Upstream FO templates. Profiled version is not supported by
  12. xsltproc, thus pofiling must be done in two steps (see Makefile) -->
  13. <xsl:import href="docbook-xsl-1.78.1/fo/docbook.xsl"/>
  14. <!-- Uncomment the following to make debugging the raw FO code easier.
  15. Note that FOP will complaints about a lot of paragraph overflows
  16. because verbatim output is also indented.
  17. Remember to comment the "rm $(BASEDIR)/lfs-pdf.fo" in
  18. the Makefile. -->
  19. <!--<xsl:output encoding="UTF-8" indent="yes" />-->
  20. <!-- Including our others customized templates. -->
  21. <xsl:include href="common.xsl"/>
  22. <xsl:include href="pdf/lfs-admon.xsl"/>
  23. <xsl:include href="pdf/lfs-index.xsl"/>
  24. <xsl:include href="pdf/lfs-lists.xsl"/>
  25. <xsl:include href="pdf/lfs-mixed.xsl"/>
  26. <xsl:include href="pdf/lfs-pagesetup.xsl"/>
  27. <xsl:include href="pdf/lfs-xref.xsl"/>
  28. <!-- Activate FOP-1 extensions. We use FOP-0.93 as the FO procesor. -->
  29. <xsl:param name="fop1.extensions" select="1"/>
  30. <!-- Deactivate draft mode. -->
  31. <xsl:param name="draft.mode" select="'no'"/>
  32. <!-- Paper size -->
  33. <xsl:param name="paper.type" select="'USletter'"/>
  34. <!-- Paper size required by the publisher
  35. <xsl:param name="paper.type" select="'Customized'"/>
  36. <xsl:param name="page.width">7.25in</xsl:param>
  37. <xsl:param name="page.height">9.25in</xsl:param>
  38. -->
  39. <!-- Is the document to be printed double sided? 1 = yes, 0 = no -->
  40. <!-- Change "double.sided" to "1" for published versions. -->
  41. <xsl:param name="double.sided" select="0"/>
  42. <!-- Hyphenate? -->
  43. <xsl:param name="hyphenate">false</xsl:param>
  44. <!-- Allow URLs to be automatically hyphenated.
  45. We have expanded the support to several inline tags.
  46. See pdf/lfs-mixed.xsl -->
  47. <xsl:param name="ulink.hyphenate" select="'&#x200B;'"/>
  48. <!-- List of characters to allow ulink URLs, and supported inline tags,
  49. to be automatically hyphenated on.
  50. Note: the / character is in the list but FOP-0.93 ignores it. -->
  51. <xsl:param name="ulink.hyphenate.chars" select="'/._-'"/>
  52. <!-- Specify the default text alignment. -->
  53. <xsl:param name="alignment">justify</xsl:param>
  54. <!-- Specify the default point size for body text.
  55. Used for calculating the size of titles. -->
  56. <xsl:param name="body.font.master">9</xsl:param>
  57. <!-- Specifies the default font size for body text. -->
  58. <xsl:param name="body.font.size">12pt</xsl:param>
  59. <!-- Control generation of ToCs and LoTs -->
  60. <xsl:param name="generate.toc">
  61. book toc,title
  62. part nop
  63. </xsl:param>
  64. <!-- How deep should recursive sections appear in the TOC? -->
  65. <xsl:param name="toc.section.depth">1</xsl:param>
  66. <!-- Amount of indentation for TOC entries. -->
  67. <xsl:param name="toc.indent.width" select="18"/>
  68. <!-- Turns page numbers in xrefs on and off. -->
  69. <xsl:param name="insert.xref.page.number">no</xsl:param>
  70. <!-- Display URLs after ulinks? 1 = yes, 0 = no
  71. Set to 0 to prevent duplicate e-mails in the Acknowledgments pages. -->
  72. <xsl:param name="ulink.show" select="0"/>
  73. <!-- Processing instruction for hard page breaks.
  74. FOP-0.93 supports @keep-*.*, @orphans, and @widows attributes,
  75. that solves several page break issues.
  76. It also supports the soft page break procesing instruction included
  77. in the DocBook stylesheets.
  78. But sometimes we may need hard page breaks for final book versions.
  79. To understand all of the page break features, see
  80. http://www.sagehill.net/docbookxsl/PageBreaking.html -->
  81. <xsl:template match="processing-instruction('hard-pagebreak')">
  82. <fo:block break-before='page'/>
  83. </xsl:template>
  84. </xsl:stylesheet>