blob: da15f717cb7e086d5d0c2c85f0c96b49134f9685 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
<?xml version='1.0'?>
<csl:stylesheet xmlns:csl="http://www.syntext.com/Extensions/CSL-1.0">
<csl:profile icon="ContentMap_small" inscription="ContentMap"/>
<csl:profile name="toc" inscription="TOC"/>
<csl:define name="any.title.template">
<csl:template match="%elem"
font-style="italic" font-weight="bold">
<csl:number level="multiple"
count="section|sect1|sect2|sect3|
sect4|sect5|simplesect"
from="chapter|article|book|part"
format="1."/>
<csl:number level="any" count="%elem" format="1. "/>
</csl:template>
</csl:define>
<csl:use ref="any.title.template" elem="figure"/>
<csl:use ref="any.title.template" elem="table"/>
<csl:use ref="any.title.template" elem="equation"/>
<csl:use ref="any.title.template" elem="example"/>
<csl:template match="synopfragment | paramdef">
<csl:number format="1"/>
<csl:when-closed>
<csl:number format="1"/>
<csl:text> </csl:text>
<csl:collect-text/>
</csl:when-closed>
</csl:template>
<!-- Ordered lists -->
<csl:define name="ordlist.template">
<csl:template match="orderedlist/listitem[
(count(ancestor-or-self::orderedlist) mod 5) = %depth]">
<csl:number level="single" count="listitem" format="%fmt"/>
<csl:when-closed>
<csl:number level="single" count="listitem" format="%fmt"/>
<csl:text> </csl:text>
<csl:collect-text/>
</csl:when-closed>
</csl:template>
</csl:define>
<csl:use ref="ordlist.template" depth="0" fmt="I."/>
<csl:use ref="ordlist.template" depth="1" fmt="1."/>
<csl:use ref="ordlist.template" depth="2" fmt="a."/>
<csl:use ref="ordlist.template" depth="3" fmt="i."/>
<csl:use ref="ordlist.template" depth="4" fmt="A."/>
<!-- Steps -->
<csl:template match="step[count(../step) = 1]">
<csl:text>•</csl:text>
</csl:template>
<csl:define name="step.template">
<csl:template
match="step[(count(ancestor-or-self::step) mod 5) = %depth]">
<csl:number count="step" format="%fmt"/>
<csl:when-closed>
<csl:number count="step" format="%fmt"/>
<csl:text> </csl:text>
<csl:collect-text/>
</csl:when-closed>
</csl:template>
</csl:define>
<csl:use ref="step.template" depth="0" fmt="I."/>
<csl:use ref="step.template" depth="1" fmt="1."/>
<csl:use ref="step.template" depth="2" fmt="a."/>
<csl:use ref="step.template" depth="3" fmt="i."/>
<csl:use ref="step.template" depth="4" fmt="A."/>
<!-- Appendix Titles -->
<csl:template match="appendix//chapter | appendix//section |
appendix//sect1 | appendix//sect2 |
appendix//sect3 | appendix//sect4 |
appendix//sect5 | appendix//simplesect"
font-style="italic" font-weight="bold">
<csl:number level="multiple"
count="chapter|section|sect1|sect2|sect3|
sect4|sect5|simplesect"
format="A."/>
<csl:when-closed>
<csl:number level="multiple"
count="chapter|section|sect1|sect2|sect3|
sect4|sect5|simplesect"
format="A."/>
<csl:text> </csl:text>
<csl:collect-text select="title"/>
</csl:when-closed>
</csl:template>
<csl:template profiles="toc"
match="appendix//chapter | appendix//section |
appendix//sect1 | appendix//sect2 |
appendix//sect3 | appendix//sect4 |
appendix//sect5 | appendix//simplesect">
<csl:number level="multiple"
count="chapter|section|sect1|sect2|sect3|
sect4|sect5|simplesect"
format="A."/>
<csl:text> </csl:text>
<csl:collect-text select="title|subtitle"/>
</csl:template>
<!-- Chapter, Section, etc numbering -->
<csl:template match="section | sect1 | sect2 |
sect3 | sect4 | sect5 | simplesect"
font-style="italic" font-weight="bold">
<csl:number level="multiple"
count="section|sect1|sect2|sect3|
sect4|sect5|simplesect"
format="1."/>
<csl:when-closed>
<csl:number level="multiple"
count="section|sect1|sect2|sect3|
sect4|sect5|simplesect"
format="1."/>
<csl:text> </csl:text>
<csl:collect-text select="title"/>
</csl:when-closed>
</csl:template>
<csl:template match="chapter|preface"
font-style="italic" font-weight="bold">
<csl:number level="any"
count="chapter|preface" format="1."/>
<csl:when-closed>
<csl:number level="any"
count="chapter|preface" format="1."/>
<csl:text> </csl:text>
<csl:collect-text select="title"/>
</csl:when-closed>
</csl:template>
<!-- Chapter, Section, etc titles -->
<csl:template match="chapter/title | section/title | sect1/title |
sect2/title | sect3/title | sect4/title |
sect5/title | simplesect/title"
font-style="italic" font-weight="bold">
<csl:collect-text/>
</csl:template>
<!-- Tables -->
<csl:template match="colspec" font-style="italic">
<csl:value-of select="concat(@colname, ' {', @colwidth, '}')"/>
</csl:template>
<!-- Defaults -->
<csl:template match="*" mixed-only="true">
<csl:collect-text/>
</csl:template>
<csl:template match="*">
<csl:when-closed>
<csl:collect-text/>
</csl:when-closed>
</csl:template>
<csl:template match="processing-instruction()|
processing-instruction('se:choice')|comment()"/>
<!-- TOC Profile -->
<csl:template profiles="toc" match="figure|table|chapter|equation"
font-style="italic">
<csl:number level="any" format="1. "/>
<csl:collect-text select="title"/>
</csl:template>
<csl:template profiles="toc" match="section | sect1 | sect2 |
sect3 | sect4 | sect5 | simplesect">
<csl:number level="multiple"
count="section|sect1|sect2|sect3|
sect4|sect5|simplesect"
format="1."/>
<csl:text> </csl:text>
<csl:collect-text select="title|subtitle"/>
</csl:template>
<csl:template profiles="toc"
match="artheader|appendix|article|bookinfo|bibliography|
bibliodiv|book|colophon|docinfo|dedication|equation|
glossary|index|objectinfo|partintro|part|
preface|procedure|reference|refentry|refsect1|
refsect2|refsect3|refsect1info|refsect2info|
refsect3info|set|setindex|setinfo|sect1info|sect2info|
sect3info|sect4info|sect5info|qandaset">
<csl:collect-text select="title|subtitle"/>
</csl:template>
<csl:template match="/*" profiles="toc">
<csl:when-closed>
<csl:collect-text/>
</csl:when-closed>
</csl:template>
</csl:stylesheet>
|