]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/common-macros.itexi
Merge branch '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 @macro spanClass {CLASS}
167 @html
168 <span class="\CLASS\">
169 @end html
170 @end macro
171
172 @macro spanEnd
173 @c keep the space for proper nesting of </p>
174
175 @html
176 </span>
177 @end html
178 @end macro
179
180
181 @c not strictly necessary, but it makes things easier for updating news
182 @macro newsItem
183 @html
184 <div class="news-item">
185 @end html
186 @end macro
187
188 @macro newsEnd
189 @c keep the space for proper nesting of </p>
190
191 @html
192 </div>
193 @end html
194 @end macro
195
196
197 @macro imageClickable{IMAGE-FILE, EXT, MORE-TEXT, CLICK-FILE, CLICK-EXT, POSITION}
198 @html
199 <div class="float-\POSITION\">
200   <a class="clickable" href="pictures/\CLICK-FILE\.\CLICK-EXT\">
201     <img src="pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
202   </a>
203   <p style="text-align: center">
204     \MORE-TEXT\
205   </p>
206 </div>
207 @end html
208 @iftex
209 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
210 @end iftex
211 @ifinfo
212 @image{lilypond/pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
213 @end ifinfo
214 @end macro
215
216 @macro imageFloat{IMAGE-FILE, EXT, POSITION}
217 @html
218 <img class="float-\POSITION\" src="pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
219 @end html
220 @iftex
221 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\,\EXT\}
222 @end iftex
223 @ifinfo
224 @image{lilypond/pictures/\IMAGE-FILE\,,,\EXT\}
225 @end ifinfo
226 @end macro
227
228 @macro imageId{ID, IMAGE-FILE, EXT, ALT}
229 @html
230 <div id="\ID\">
231   <img src="pictures/\IMAGE-FILE\.\EXT\" alt="\ALT\">
232 </div>
233 @end html
234 @iftex
235 @image{pictures/\IMAGE-FILE\,,,\ALT\}
236 @end iftex
237 @ifinfo
238 @image{lilypond/pictures/\IMAGE-FILE\,,,\ALT\}
239 @end ifinfo
240 @end macro
241
242 @end ifset