]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/common-macros.itexi
baff739e3cfce1bde7ccf04a13d4708ae16d9ce8
[lilypond.git] / Documentation / common-macros.itexi
1 @c -*- coding: utf-8; mode: texinfo; -*-
2
3
4 @c ***********************************************
5 @c SEE MACRO DEFINITION GUIDELINES IN macros.itexi
6 @c ***********************************************
7
8 @c Don't replace quotes with directed quotes.
9
10 @set txicodequoteundirected
11 @set txicodequotebacktick
12
13
14 @c   ***** Displaying text *****
15
16 @c We need this since @q{\} doesn't work with makeinfo 4.11 --
17 @c say @q{@bs{}} instead.
18
19 @macro bs
20 \\
21 @end macro
22
23
24 @ifnotinfo
25
26 @macro notation{TEXT}
27 @var{\TEXT\}
28 @end macro
29
30 @end ifnotinfo
31
32 @ifinfo
33
34 @macro notation{TEXT}
35 \TEXT\
36 @end macro
37
38 @end ifinfo
39
40
41 @macro smallspace
42 @sp 1
43 @end macro
44
45
46 @c   ***** Displaying images not generated by lilypond-book *****
47
48 @c Current installation setup of Info docs requires that all images are
49 @c expected to be found in the `lilypond/' subdirectory.  `lilypond-book'
50 @c already generates proper @image commands for images of music; these
51 @c macro definitions do the same for other images.
52
53 @ifnotinfo
54
55 @macro sourceimage{FILENAME,WIDTH,HEIGHT,ALTTEXT}
56 @image{pictures/\FILENAME\,\WIDTH\,\HEIGHT\,\ALTTEXT\}
57 @end macro
58
59 @end ifnotinfo
60
61 @ifinfo
62
63 @macro sourceimage{FILENAME,WIDTH,HEIGHT,ALTTEXT}
64 @image{lilypond/pictures/\FILENAME\,\WIDTH\,\HEIGHT\,\ALTTEXT\}
65 @end macro
66
67 @end ifinfo
68
69
70 @c   ***** Headers *****
71
72 @ifclear snippets-sections
73 @macro lydoctitle {TEXT}
74 @need 600
75 @emph{\TEXT\}
76 @end macro
77 @end ifclear
78
79 @c   ***** Indexing *****
80
81 @c Don't remove the `@c' within the macro definition!  See section 19.3,
82 @c `Macro Details and Caveats', in the texinfo info file for explanation.
83
84 @macro funindex {TEXT}
85 @findex \TEXT\
86 @kindex \TEXT\
87 @c
88 @end macro
89
90
91 @c   ***** Macros specific to translated docs *****
92
93 @c ugh, cannot set/define global variable 'translationof' in any way :-(
94
95 @iftex
96
97 @macro translationof{TEXT}
98 @end macro
99
100 @end iftex
101
102 @ifinfo
103
104 @macro translationof{TEXT}
105 @set translationof \TEXT\
106 @end macro
107
108 @end ifinfo
109
110 @ifhtml
111
112 @ifset bigpage
113 @macro untranslated
114 @end macro
115 @end ifset
116
117 @ifclear bigpage
118 @macro untranslated
119 UNTRANSLATED NODE: IGNORE ME
120 @end macro
121 @end ifclear
122
123 @end ifhtml
124
125 @ifnothtml
126
127 @macro untranslated
128 @end macro
129
130 @end ifnothtml
131
132
133 @c  ***** Macros specific to the web site *****
134
135 @ifset web
136
137 @c make link to bugfixes for news.itexi
138 @c use underscores for version: @bugfixes{2_13_13,}
139 @c use specifier arg when listing multiple versions
140 @c (see September 20, 2007 post for an example)
141 @macro bugfixes{version,specifier}
142 @uref{http://code.google.com/p/lilypond/issues/list?can=1&q=fixed_\version\&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary,Bugfixes
143 \specifier\}
144 @end macro
145
146 @macro divId {ID}
147 @html
148 <div id="\ID\">
149 @end html
150 @end macro
151
152 @macro divClass {CLASS}
153 @html
154 <div class="\CLASS\">
155 @end html
156 @end macro
157
158 @macro divEnd
159 @c keep the space for proper nesting of </p>
160
161 @html
162 </div>
163 @end html
164 @end macro
165
166 @ifclear web_version
167   @ifclear bigpage
168     @macro docLink{name,target,webLink}
169       @uref{../\target\, \name\}
170     @end macro
171   @end ifclear
172   @ifset bigpage
173     @macro docLink{name,target,webLink}
174       @uref{\target\, \name\}
175     @end macro
176   @end ifset
177 @end ifclear
178 @ifset web_version
179   @macro docLink{name,target,webLink}
180     \webLink\
181   @end macro
182 @end ifset
183
184 @macro miscLink{MISC-FILE,MISC-TEXT}
185 @uref{http://lilypond.org/website/misc/\MISC-FILE\,\MISC-TEXT\}
186 @end macro
187
188 @macro spanClass {CLASS}
189 @html
190 <span class="\CLASS\">
191 @end html
192 @end macro
193
194 @macro spanEnd
195 @c keep the space for proper nesting of </p>
196
197 @html
198 </span>
199 @end html
200 @end macro
201
202
203 @c not strictly necessary, but it makes things easier for updating news
204 @macro newsItem
205 @html
206 <div class="news-item">
207 @end html
208 @end macro
209
210 @macro newsEnd
211 @c keep the space for proper nesting of </p>
212
213 @html
214 </div>
215 @end html
216 @end macro
217
218
219 @macro imageClickable{IMAGE-FILE, EXT, MORE-TEXT, CLICK-FILE, CLICK-EXT, POSITION}
220 @html
221 <div class="float-\POSITION\">
222   <a class="clickable" href="pictures/\CLICK-FILE\.\CLICK-EXT\">
223     <img src="pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
224   </a>
225   <p style="text-align: center">
226     \MORE-TEXT\
227   </p>
228 </div>
229 @end html
230 @iftex
231 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
232 @end iftex
233 @ifinfo
234 @image{lilypond/pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
235 @end ifinfo
236 @end macro
237
238 @macro imageFloat{IMAGE-FILE, EXT, POSITION}
239 @html
240 <img class="float-\POSITION\" src="pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
241 @end html
242 @iftex
243 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\,\EXT\}
244 @end iftex
245 @ifinfo
246 @image{lilypond/pictures/\IMAGE-FILE\,,,\EXT\}
247 @end ifinfo
248 @end macro
249
250 @macro imageId{ID, IMAGE-FILE, EXT, ALT}
251 @html
252 <div id="\ID\">
253   <img src="pictures/\IMAGE-FILE\.\EXT\" alt="\ALT\">
254 </div>
255 @end html
256 @iftex
257 @image{pictures/\IMAGE-FILE\,,,\ALT\}
258 @end iftex
259 @ifinfo
260 @image{lilypond/pictures/\IMAGE-FILE\,,,\ALT\}
261 @end ifinfo
262 @end macro
263
264 @end ifset