source: stylesheets/pdf/lfs-admon.xsl@ 3fe8b511

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 3fe8b511 was 3fe8b511, checked in by Bruce Dubbs <bdubbs@…>, 19 years ago

Update stylesheets and fix Python references

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3217 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 3.7 KB
RevLine 
[3fe8b511]1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<xsl:stylesheet 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
8 <!-- Graphics in admonitions -->
9 <xsl:param name="admon.graphics" select="1"/>
10 <xsl:param name="admon.graphics.path" select="'images/'"/>
11
12 <!-- Admonition block properties -->
13 <xsl:template match="important|warning|caution">
14 <xsl:choose>
15 <xsl:when test="$admon.graphics != 0">
16 <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em"
17 space-before.maximum="0.8em" border-style="solid" border-width="1pt"
18 border-color="#500" background-color="#FFFFE6">
19 <xsl:call-template name="graphical.admonition"/>
20 </fo:block>
21 </xsl:when>
22 <xsl:otherwise>
23 <xsl:call-template name="nongraphical.admonition"/>
24 </xsl:otherwise>
25 </xsl:choose>
26 </xsl:template>
27
28 <xsl:template match="note|tip">
29 <xsl:choose>
30 <xsl:when test="$admon.graphics != 0">
31 <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em"
32 space-before.maximum="0.8em" border-style="solid" border-width="1pt"
33 border-color="#E0E0E0" background-color="#FFFFE6">
34 <xsl:call-template name="graphical.admonition"/>
35 </fo:block>
36 </xsl:when>
37 <xsl:otherwise>
38 <xsl:call-template name="nongraphical.admonition"/>
39 </xsl:otherwise>
40 </xsl:choose>
41 </xsl:template>
42
43 <!-- Admonitions text properties -->
44 <xsl:attribute-set name="admonition.properties">
45 <xsl:attribute name="margin-right">6pt</xsl:attribute>
46 </xsl:attribute-set>
47
48 <!-- Adding left space to the graphics and color to the titles -->
49 <xsl:template name="graphical.admonition">
50 <xsl:variable name="id">
51 <xsl:call-template name="object.id"/>
52 </xsl:variable>
53 <xsl:variable name="graphic.width">
54 <xsl:apply-templates select="." mode="admon.graphic.width"/>
55 </xsl:variable>
56 <fo:block id="{$id}">
57 <fo:list-block provisional-distance-between-starts="{$graphic.width} + 18pt"
58 provisional-label-separation="18pt" xsl:use-attribute-sets="list.block.spacing">
59 <fo:list-item>
60 <fo:list-item-label end-indent="label-end()">
61 <fo:block margin-left="4pt">
62 <fo:external-graphic width="auto" height="auto"
63 content-width="{$graphic.width}" >
64 <xsl:attribute name="src">
65 <xsl:call-template name="admon.graphic"/>
66 </xsl:attribute>
67 </fo:external-graphic>
68 </fo:block>
69 </fo:list-item-label>
70 <fo:list-item-body start-indent="body-start()">
71 <xsl:if test="$admon.textlabel != 0 or title">
72 <fo:block xsl:use-attribute-sets="admonition.title.properties">
73 <xsl:if test="ancestor-or-self::important">
74 <xsl:attribute name="color">#500</xsl:attribute>
75 </xsl:if>
76 <xsl:if test="ancestor-or-self::warning">
77 <xsl:attribute name="color">#500</xsl:attribute>
78 </xsl:if>
79 <xsl:if test="ancestor-or-self::caution">
80 <xsl:attribute name="color">#500</xsl:attribute>
81 </xsl:if>
82 <xsl:apply-templates select="." mode="object.title.markup"/>
83 </fo:block>
84 </xsl:if>
85 <fo:block xsl:use-attribute-sets="admonition.properties">
86 <xsl:apply-templates/>
87 </fo:block>
88 </fo:list-item-body>
89 </fo:list-item>
90 </fo:list-block>
91 </fo:block>
92 </xsl:template>
93
94</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.