summaryrefslogtreecommitdiff
path: root/Documentation/common-macros.itexi
blob: 11bae886e4613c31e968b31deb11a3cc2aa51268 (about) (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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
@c -*- coding: utf-8; mode: texinfo; -*-


@c ***********************************************
@c SEE MACRO DEFINITION GUIDELINES IN macros.itexi
@c ***********************************************

@c Don't replace quotes with directed quotes.

@set txicodequoteundirected
@set txicodequotebacktick


@c   ***** Displaying text *****

@c We need this since @q{\} doesn't work with makeinfo 4.11 --
@c say @q{@bs{}} instead.

@macro bs
\\
@end macro


@ifnotinfo

@macro notation{TEXT}
@var{\TEXT\}
@end macro

@end ifnotinfo

@ifinfo

@macro notation{TEXT}
\TEXT\
@end macro

@end ifinfo


@macro smallspace
@sp 1
@end macro


@c   ***** Displaying images not generated by lilypond-book *****

@c Current installation setup of Info docs requires that all images are
@c expected to be found in the `lilypond/' subdirectory.  `lilypond-book'
@c already generates proper @image commands for images of music; these
@c macro definitions do the same for other images.

@ifnotinfo

@macro sourceimage{FILENAME,WIDTH,HEIGHT,ALTTEXT}
@image{pictures/\FILENAME\,\WIDTH\,\HEIGHT\,\ALTTEXT\}
@end macro

@end ifnotinfo

@ifinfo

@macro sourceimage{FILENAME,WIDTH,HEIGHT,ALTTEXT}
@image{lilypond/pictures/\FILENAME\,\WIDTH\,\HEIGHT\,\ALTTEXT\}
@end macro

@end ifinfo


@c   ***** Headers *****

@ifclear snippets-sections
@macro lydoctitle {TEXT}
@need 600
@emph{\TEXT\}
@end macro
@end ifclear

@c   ***** Indexing *****

@c Don't remove the `@c' within the macro definition!  See section 19.3,
@c `Macro Details and Caveats', in the texinfo info file for explanation.

@macro funindex {TEXT}
@findex \TEXT\
@kindex \TEXT\
@c
@end macro


@c   ***** Macros specific to translated docs *****

@c ugh, cannot set/define global variable 'translationof' in any way :-(

@iftex

@macro translationof{TEXT}
@end macro

@end iftex

@ifinfo

@macro translationof{TEXT}
@set translationof \TEXT\
@end macro

@end ifinfo

@ifhtml

@ifset bigpage
@macro untranslated
@end macro
@end ifset

@ifclear bigpage
@macro untranslated
UNTRANSLATED NODE: IGNORE ME
@end macro
@end ifclear

@end ifhtml

@ifnothtml

@macro untranslated
@end macro

@end ifnothtml


@c  ***** Macros specific to the web site *****

@ifset web

@c make link to bugfixes for news.itexi
@c use underscores for version: @bugfixes{2_13_13,}
@c use specifier arg when listing multiple versions
@c (see September 20, 2007 post for an example)
@macro bugfixes{version,specifier}
@uref{http://code.google.com/p/lilypond/issues/list?can=1&q=fixed_\version\&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary,Bugfixes
\specifier\}
@end macro

@macro divId {ID}
@html
<div id="\ID\">
@end html
@end macro

@macro divClass {CLASS}
@html
<div class="\CLASS\">
@end html
@end macro

@macro divEnd
@c keep the space for proper nesting of </p>

@html
</div>
@end html
@end macro

@macro spanClass {CLASS}
@html
<span class="\CLASS\">
@end html
@end macro

@macro spanEnd
@c keep the space for proper nesting of </p>

@html
</span>
@end html
@end macro


@c not strictly necessary, but it makes things easier for updating news
@macro newsItem
@html
<div class="news-item">
@end html
@end macro

@macro newsEnd
@c keep the space for proper nesting of </p>

@html
</div>
@end html
@end macro


@macro imageClickable{IMAGE-FILE, EXT, MORE-TEXT, CLICK-FILE, CLICK-EXT, POSITION}
@html
<div class="float-\POSITION\">
  <a class="clickable" href="../pictures/\CLICK-FILE\.\CLICK-EXT\">
    <img src="../pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
  </a>
  <p style="text-align: center">
    \MORE-TEXT\
  </p>
</div>
@end html
@iftex
@image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
@end iftex
@ifinfo
@image{lilypond/pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
@end ifinfo
@end macro

@macro imageFloat{IMAGE-FILE, EXT, POSITION}
@html
<img class="float-\POSITION\" src="../pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
@end html
@iftex
@image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\,\EXT\}
@end iftex
@ifinfo
@image{lilypond/pictures/\IMAGE-FILE\,,,\EXT\}
@end ifinfo
@end macro

@macro imageId{ID, IMAGE-FILE, EXT, ALT}
@html
<div id="\ID\">
  <img src="../pictures/\IMAGE-FILE\.\EXT\" alt="\ALT\">
</div>
@end html
@iftex
@image{pictures/\IMAGE-FILE\,,,\ALT\}
@end iftex
@ifinfo
@image{lilypond/pictures/\IMAGE-FILE\,,,\ALT\}
@end ifinfo
@end macro

@end ifset