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