lfs-admon.xsl 2.7 KB

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