doc/man/manpage.xsl: indent the body of formal (example) blocks
[lttng-tools.git] / doc / man / manpage.xsl
CommitLineData
360c4f63
PP
1<?xml version='1.0'?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
ee43e250 4 <!-- Callouts -->
360c4f63
PP
5 <xsl:template match="*[local-name() = 'co']">
6 <xsl:value-of select="concat('\','fB(',substring-after(@id,'-'),')','\','fR')"/>
7 </xsl:template>
8 <xsl:template match="*[local-name() = 'calloutlist']">
9 <xsl:value-of select="."/>
10 <xsl:text>sp&#10;</xsl:text>
11 <xsl:apply-templates/>
12 <xsl:text>&#10;</xsl:text>
13 </xsl:template>
14 <xsl:template match="*[local-name() = 'callout']">
15 <xsl:value-of select="concat('\','fB',substring-after(@arearefs,'-'),'. ','\','fR')"/>
16 <xsl:apply-templates/>
17 <xsl:value-of select="."/>
18 <xsl:text>br&#10;</xsl:text>
19 </xsl:template>
20
ee43e250 21 <!-- Links -->
360c4f63
PP
22 <xsl:template match="*[local-name() = 'ulink']">
23 <xsl:apply-templates/><xsl:text> &lt;</xsl:text><xsl:value-of select="@url"/><xsl:text>&gt;</xsl:text>
24 </xsl:template>
25 <xsl:template match="*[local-name() = 'link']">
26 <xsl:text>\fI</xsl:text><xsl:apply-templates/><xsl:text>\fR</xsl:text>
27 </xsl:template>
28
ee43e250 29 <!-- Literal -->
360c4f63
PP
30 <xsl:template match="*[local-name() = 'literal']">
31 <xsl:text>\fB</xsl:text>
32 <xsl:value-of select="." />
33 <xsl:text>\fR</xsl:text>
34 </xsl:template>
35
ee43e250
PP
36 <!--
37 Make admonitions look like this:
38
39 Some paragraph.
40
41 Note
42 Sit sed culpa elit dolore esse irure dolor amet magna
43 veniam elit ut.
44
45 Duis adipisicing magna quis in in in reprehenderit
46 proident minim cupidatat dolore sit minim deserunt duis dolore ex ea.
47
48 Next paragraph.
49
50 instead of:
51
52 Some paragraph.
53
54 Note
55 Sit sed culpa elit dolore esse irure dolor amet magna
56 veniam elit ut.
57
58 Duis adipisicing magna quis in in in reprehenderit
59 proident minim cupidatat dolore sit minim deserunt duis
60 dolore ex ea.
61
62 Next paragraph.
63
64 This looks better when, for example, you put a note immediately
65 after a list:
66
67 Ambiguous:
68 • Some list item.
69
70 • Some other list item.
71
72 Note
73 Does this note apply to the last list item or to the
74 previous block?
75
76 Clear:
77 • Some list item.
78
79 • Some other list item.
80
81 Note
82 This note applies to the previous block.
83 -->
84 <xsl:template match="caution|important|note|tip|warning">
85 <xsl:call-template name="roff-if-start">
86 <xsl:with-param name="condition">n</xsl:with-param>
87 </xsl:call-template>
88 <xsl:text>.sp&#10;</xsl:text>
89 <xsl:call-template name="roff-if-end"/>
90 <xsl:if test="not($man.output.better.ps.enabled = 0)">
91 <xsl:text>.BM yellow&#10;</xsl:text>
92 </xsl:if>
93 <xsl:call-template name="pinch.together"/>
94 <xsl:text>.ps +1&#10;</xsl:text>
95 <xsl:call-template name="make.bold.title"/>
96 <xsl:text>.ps -1&#10;</xsl:text>
97 <xsl:text>.br&#10;</xsl:text>
98 <xsl:text>.RS 4&#10;</xsl:text>
99 <xsl:apply-templates/>
100 <xsl:text>.sp .5v&#10;</xsl:text>
101 <xsl:if test="not($man.output.better.ps.enabled = 0)">
102 <xsl:text>.EM yellow&#10;</xsl:text>
103 </xsl:if>
104 <xsl:text>.RE&#10;</xsl:text>
105 </xsl:template>
106
107 <!-- Disable end notes -->
360c4f63 108 <xsl:param name="man.endnotes.are.numbered">0</xsl:param>
ee43e250
PP
109
110 <!-- Disable hyphenation, except for URLs -->
111 <xsl:param name="man.hyphenate">0</xsl:param>
e23377d2
PP
112
113 <!--
114 Mainly for example blocks: indent the whole example after
115 the title, like this:
116
117 Example 1. Do something
118
119 Amet consectetur adipisicing minim sunt ad dolore culpa
120 enim labore incididunt cillum exercitation non non
121 deserunt veniam consectetur sint.
122
123 $ lttng something
124
125 Voluptate aliquip.
126
127 instead of:
128
129 Example 1. Do something
130
131 Amet consectetur adipisicing minim sunt ad dolore culpa
132 enim labore incididunt cillum exercitation non non
133 deserunt veniam consectetur sint.
134
135 $ lttng something
136
137 Voluptate aliquip.
138 -->
139 <xsl:template name="formal.object">
140 <xsl:param name="placement" select="'before'"/>
141 <xsl:param name="class" select="local-name(.)"/>
142
143 <xsl:choose>
144 <xsl:when test="$placement = 'before'">
145 <xsl:call-template name="formal.object.heading"/>
146 <xsl:text>.RS 4&#10;</xsl:text>
147 <xsl:apply-templates/>
148 <xsl:text>.RE&#10;</xsl:text>
149 </xsl:when>
150 <xsl:otherwise>
151 <xsl:text>.RS 4&#10;</xsl:text>
152 <xsl:apply-templates/>
153 <xsl:text>.RE&#10;</xsl:text>
154 <xsl:call-template name="formal.object.heading"/>
155 </xsl:otherwise>
156 </xsl:choose>
157 </xsl:template>
360c4f63 158</xsl:stylesheet>
This page took 0.048476 seconds and 5 git commands to generate.