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