source: BOOK/stylesheets/lfs-xsl/pdf/lfs-admon.xsl@ 35c10eb

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 35c10eb was f8c4e94, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added LFS XSL Stylesheets.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<!--
4$LastChangedBy$
5$Date$
6-->
7
8<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
9 xmlns:fo="http://www.w3.org/1999/XSL/Format"
10 version="1.0">
11
12 <!-- This stylesheet controls how admonitions are displayed -->
13
14 <!-- Use graphics in admonitions? 1 = yes, 0 = no -->
15 <xsl:param name="admon.graphics" select="1"/>
16
17 <!-- Path to admonition graphics relative to index.xml -->
18 <xsl:param name="admon.graphics.path" select="'images/'"/>
19
20 <!-- Global admonitions properties -->
21 <xsl:attribute-set name="graphical.admonition.properties">
22 <xsl:attribute name="keep-together.within-column">
23 <xsl:variable name="keep.together">
24 <xsl:call-template name="pi.dbfo_keep-together"/>
25 </xsl:variable>
26 <xsl:choose>
27 <xsl:when test="$keep.together != ''">
28 <xsl:value-of select="$keep.together"/>
29 </xsl:when>
30 <xsl:otherwise>always</xsl:otherwise>
31 </xsl:choose>
32 </xsl:attribute>
33 <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
34 <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
35 <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
36 <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
37 <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
38 <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
39 <xsl:attribute name="padding-start">5pt</xsl:attribute>
40 <xsl:attribute name="padding-top">5pt</xsl:attribute>
41 <xsl:attribute name="padding-bottom">5pt</xsl:attribute>
42 <xsl:attribute name="border-style">solid</xsl:attribute>
43 <xsl:attribute name="border-width">0.5pt</xsl:attribute>
44 <xsl:attribute name="background-color">#FFFFE6</xsl:attribute>
45 <xsl:attribute name="border-color">
46 <xsl:choose>
47 <xsl:when test="self::note | self::tip">#E0E0E0</xsl:when>
48 <xsl:otherwise>#DCC</xsl:otherwise>
49 </xsl:choose>
50 </xsl:attribute>
51 </xsl:attribute-set>
52
53 <!-- Properties for admonitions titles -->
54 <xsl:attribute-set name="admonition.title.properties">
55 <xsl:attribute name="font-size">14pt</xsl:attribute>
56 <xsl:attribute name="font-weight">bold</xsl:attribute>
57 <xsl:attribute name="hyphenate">false</xsl:attribute>
58 <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
59 <xsl:attribute name="color">
60 <xsl:choose>
61 <xsl:when test="ancestor-or-self::important | ancestor-or-self::warning
62 | ancestor-or-self::caution">#500</xsl:when>
63 <xsl:otherwise>#000</xsl:otherwise>
64 </xsl:choose>
65 </xsl:attribute>
66 </xsl:attribute-set>
67
68 <!-- Properties for admonitions text -->
69 <xsl:attribute-set name="admonition.properties">
70 <xsl:attribute name="margin-right">5pt</xsl:attribute>
71 </xsl:attribute-set>
72
73 <!-- admon.graphic.width:
74 Making the graphic smaller. -->
75 <!-- The original template is in {docbook-xsl}/fo/admon.xsl -->
76 <xsl:template match="*" mode="admon.graphic.width">
77 <xsl:param name="node" select="."/>
78 <xsl:text>24pt</xsl:text>
79 </xsl:template>
80
81</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.