]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/common-macros.itexi
Merge branch 'master' into lilypond/translation
[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 spanClass {CLASS}
185 @html
186 <span class="\CLASS\">
187 @end html
188 @end macro
189
190 @macro spanEnd
191 @c keep the space for proper nesting of </p>
192
193 @html
194 </span>
195 @end html
196 @end macro
197
198
199 @c not strictly necessary, but it makes things easier for updating news
200 @macro newsItem
201 @html
202 <div class="news-item">
203 @end html
204 @end macro
205
206 @macro newsEnd
207 @c keep the space for proper nesting of </p>
208
209 @html
210 </div>
211 @end html
212 @end macro
213
214
215 @macro imageClickable{IMAGE-FILE, EXT, MORE-TEXT, CLICK-FILE, CLICK-EXT, POSITION}
216 @html
217 <div class="float-\POSITION\">
218   <a class="clickable" href="pictures/\CLICK-FILE\.\CLICK-EXT\">
219     <img src="pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
220   </a>
221   <p style="text-align: center">
222     \MORE-TEXT\
223   </p>
224 </div>
225 @end html
226 @iftex
227 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
228 @end iftex
229 @ifinfo
230 @image{lilypond/pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
231 @end ifinfo
232 @end macro
233
234 @macro imageFloat{IMAGE-FILE, EXT, POSITION}
235 @html
236 <img class="float-\POSITION\" src="pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
237 @end html
238 @iftex
239 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\,\EXT\}
240 @end iftex
241 @ifinfo
242 @image{lilypond/pictures/\IMAGE-FILE\,,,\EXT\}
243 @end ifinfo
244 @end macro
245
246 @macro imageId{ID, IMAGE-FILE, EXT, ALT}
247 @html
248 <div id="\ID\">
249   <img src="pictures/\IMAGE-FILE\.\EXT\" alt="\ALT\">
250 </div>
251 @end html
252 @iftex
253 @image{pictures/\IMAGE-FILE\,,,\ALT\}
254 @end iftex
255 @ifinfo
256 @image{lilypond/pictures/\IMAGE-FILE\,,,\ALT\}
257 @end ifinfo
258 @end macro
259
260 @end ifset