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