]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/common-macros.itexi
Doc build: move general.texi back into a subdir.
[lilypond.git] / Documentation / common-macros.itexi
1 @c -*- coding: utf-8; mode: texinfo; -*-
2
3
4 @c Don't replace quotes with directed quotes.
5
6 @set txicodequoteundirected
7 @set txicodequotebacktick
8
9
10 @c   ***** Displaying text *****
11
12 @c We need this since @q{\} doesn't work with makeinfo 4.11 --
13 @c say @q{@bs{}} instead.
14
15 @macro bs
16 \\
17 @end macro
18
19
20 @ifnotinfo
21
22 @macro notation{TEXT}
23 @var{\TEXT\}
24 @end macro
25
26 @end ifnotinfo
27
28 @ifinfo
29
30 @macro notation{TEXT}
31 \TEXT\
32 @end macro
33
34 @end ifinfo
35
36
37 @macro smallspace
38 @sp 1
39 @end macro
40
41
42 @c   ***** Displaying images not generated by lilypond-book *****
43
44 @c Current installation setup of Info docs requires that all images are
45 @c expected to be found in the `lilypond/' subdirectory.  `lilypond-book'
46 @c already generates proper @image commands for images of music; these
47 @c macro definitions do the same for other images.
48
49 @ifnotinfo
50
51 @macro sourceimage{FILENAME,WIDTH,HEIGHT,ALTTEXT}
52 @image{pictures/\FILENAME\,\WIDTH\,\HEIGHT\,\ALTTEXT\}
53 @end macro
54
55 @end ifnotinfo
56
57 @ifinfo
58
59 @macro sourceimage{FILENAME,WIDTH,HEIGHT,ALTTEXT}
60 @image{lilypond/pictures/\FILENAME\,\WIDTH\,\HEIGHT\,\ALTTEXT\}
61 @end macro
62
63 @end ifinfo
64
65
66 @c   ***** Headers *****
67
68 @ifclear snippets-sections
69 @macro lydoctitle {TEXT}
70 @need 600
71 @emph{\TEXT\}
72 @end macro
73 @end ifclear
74
75 @c   ***** Indexing *****
76
77 @c Don't remove the `@c' within the macro definition!  See section 19.3,
78 @c `Macro Details and Caveats', in the texinfo info file for explanation.
79
80 @macro funindex {TEXT}
81 @findex \TEXT\
82 @kindex \TEXT\
83 @c
84 @end macro
85
86
87 @c   ***** Macros specific to translated docs *****
88
89 @c ugh, cannot set/define global variable 'translationof' in any way :-(
90
91 @iftex
92
93 @macro translationof{TEXT}
94 @end macro
95
96 @end iftex
97
98 @ifinfo
99
100 @macro translationof{TEXT}
101 @set translationof \TEXT\
102 @end macro
103
104 @end ifinfo
105
106 @ifhtml
107
108 @ifset bigpage
109 @macro untranslated
110 @end macro
111 @end ifset
112
113 @ifclear bigpage
114 @macro untranslated
115 UNTRANSLATED NODE: IGNORE ME
116 @end macro
117 @end ifclear
118
119 @end ifhtml
120
121 @ifnothtml
122
123 @macro untranslated
124 @end macro
125
126 @end ifnothtml
127
128
129 @c  ***** Macros specific to the web site *****
130
131 @ifset web
132
133 @macro help{TEXT}
134 @html
135 <div class="help">
136 <strong>
137   <span style="text-decoration:blink">Help wanted:</span>
138 </strong> \TEXT\
139 </div>
140 @end html
141 @end macro
142
143 @macro divId {ID}
144 @html
145 <div id="\ID\">
146 @end html
147 @end macro
148
149 @macro divClass {CLASS}
150 @html
151 <div class="\CLASS\">
152 @end html
153 @end macro
154
155 @macro divEnd
156 @c keep the space for proper nesting of </p>
157
158 @html
159 </div>
160 @end html
161 @end macro
162
163
164 @c not strictly necessary, but it makes things easier for updating news
165 @macro newsItem
166 @html
167 <div class="news-item">
168 @end html
169 @end macro
170
171 @macro newsEnd
172 @c keep the space for proper nesting of </p>
173
174 @html
175 </div>
176 @end html
177 @end macro
178
179 @macro exampleImage{IMAGE-FILE}
180 @html
181 <div class="float-center">
182   <a class="clickable" href="examples/\IMAGE-FILE\.png">
183     <img src="examples/\IMAGE-FILE\-small.png" alt="\IMAGE-FILE\">
184   </a>
185   <p style="text-align: center">
186     (click to enlarge)
187   </p>
188 </div>
189 @end html
190 @iftex
191 @image{examples/\IMAGE-FILE\-small,,,\IMAGE-FILE\,png}
192 @end iftex
193 @ifinfo
194 @image{lilypond/examples/\IMAGE-FILE\,,,\IMAGE-FILE\,png}
195 @end ifinfo
196 @end macro
197
198
199
200 @macro imageClickable{IMAGE-FILE, EXT, MORE-TEXT, CLICK-FILE, CLICK-EXT, POSITION}
201 @html
202 <div class="float-\POSITION\">
203   <a class="clickable" href="../pictures/\CLICK-FILE\.\CLICK-EXT\">
204     <img src="../pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
205   </a>
206   <p style="text-align: center">
207     \MORE-TEXT\
208   </p>
209 </div>
210 @end html
211 @iftex
212 @image{../pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
213 @end iftex
214 @ifinfo
215 @image{lilypond/pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
216 @end ifinfo
217 @end macro
218
219 @macro imageFloat{IMAGE-FILE, EXT, POSITION}
220 @html
221 <img class="float-\POSITION\" src="../pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
222 @end html
223 @iftex
224 @image{../pictures/\IMAGE-FILE\,,,\IMAGE-FILE\,\EXT\}
225 @end iftex
226 @ifinfo
227 @image{lilypond/pictures/\IMAGE-FILE\,,,\EXT\}
228 @end ifinfo
229 @end macro
230
231 @macro imageId{ID, IMAGE-FILE, EXT, ALT}
232 @html
233 <div id="\ID\">
234   <img src="../pictures/\IMAGE-FILE\.\EXT\" alt="\ALT\">
235 </div>
236 @end html
237 @iftex
238 @image{../pictures/\IMAGE-FILE\,,,\ALT\}
239 @end iftex
240 @ifinfo
241 @image{lilypond/pictures/\IMAGE-FILE\,,,\ALT\}
242 @end ifinfo
243 @end macro
244
245 @end ifset