lfs-admon.xsl 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version='1.0' encoding='ISO-8859-1'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  4. version="1.0">
  5. <!-- Use graphics in admonitions? 1 = yes, 0 = no -->
  6. <xsl:param name="admon.graphics" select="1"/>
  7. <!-- Path to admonition graphics relative to index.xml -->
  8. <xsl:param name="admon.graphics.path" select="'images/'"/>
  9. <!-- Global admonitions properties -->
  10. <xsl:attribute-set name="graphical.admonition.properties">
  11. <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
  12. <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
  13. <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
  14. <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
  15. <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
  16. <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
  17. <xsl:attribute name="border-style">solid</xsl:attribute>
  18. <xsl:attribute name="border-width">1pt</xsl:attribute>
  19. <xsl:attribute name="background-color">#FFFFE6</xsl:attribute>
  20. <xsl:attribute name="border-color">
  21. <xsl:choose>
  22. <xsl:when test="self::note | self::tip">#E0E0E0</xsl:when>
  23. <xsl:otherwise>#500</xsl:otherwise>
  24. </xsl:choose>
  25. </xsl:attribute>
  26. </xsl:attribute-set>
  27. <!-- Properties for admonitions titles -->
  28. <xsl:attribute-set name="admonition.title.properties">
  29. <xsl:attribute name="font-size">14pt</xsl:attribute>
  30. <xsl:attribute name="font-weight">bold</xsl:attribute>
  31. <xsl:attribute name="hyphenate">false</xsl:attribute>
  32. <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
  33. <xsl:attribute name="color">
  34. <xsl:choose>
  35. <xsl:when test="ancestor-or-self::important | ancestor-or-self::warning
  36. | ancestor-or-self::caution">#500</xsl:when>
  37. <xsl:otherwise>#000</xsl:otherwise>
  38. </xsl:choose>
  39. </xsl:attribute>
  40. </xsl:attribute-set>
  41. <!-- Properties for admonitions text -->
  42. <xsl:attribute-set name="admonition.properties">
  43. <xsl:attribute name="margin-right">6pt</xsl:attribute>
  44. </xsl:attribute-set>
  45. <!-- admon.graphic.width:
  46. Making the graphic smaller. -->
  47. <!-- The original template is in {docbook-xsl}/fo/admon.xsl -->
  48. <xsl:template match="*" mode="admon.graphic.width">
  49. <xsl:param name="node" select="."/>
  50. <xsl:text>24pt</xsl:text>
  51. </xsl:template>
  52. </xsl:stylesheet>