]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/common-macros.itexi
Revert "Docs: more macros cleanup"
[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 @macro help{TEXT}
138 @html
139 <div class="help">
140 <strong>
141   <span style="text-decoration:blink">Help wanted:</span>
142 </strong> \TEXT\
143 </div>
144 @end html
145 @end macro
146
147 @macro divId {ID}
148 @html
149 <div id="\ID\">
150 @end html
151 @end macro
152
153 @macro divClass {CLASS}
154 @html
155 <div class="\CLASS\">
156 @end html
157 @end macro
158
159 @macro divEnd
160 @c keep the space for proper nesting of </p>
161
162 @html
163 </div>
164 @end html
165 @end macro
166
167
168 @c not strictly necessary, but it makes things easier for updating news
169 @macro newsItem
170 @html
171 <div class="news-item">
172 @end html
173 @end macro
174
175 @macro newsEnd
176 @c keep the space for proper nesting of </p>
177
178 @html
179 </div>
180 @end html
181 @end macro
182
183
184 @macro imageClickable{IMAGE-FILE, EXT, MORE-TEXT, CLICK-FILE, CLICK-EXT, POSITION}
185 @html
186 <div class="float-\POSITION\">
187   <a class="clickable" href="../pictures/\CLICK-FILE\.\CLICK-EXT\">
188     <img src="../pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
189   </a>
190   <p style="text-align: center">
191     \MORE-TEXT\
192   </p>
193 </div>
194 @end html
195 @iftex
196 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
197 @end iftex
198 @ifinfo
199 @image{lilypond/pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
200 @end ifinfo
201 @end macro
202
203 @macro imageFloat{IMAGE-FILE, EXT, POSITION}
204 @html
205 <img class="float-\POSITION\" src="../pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
206 @end html
207 @iftex
208 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\,\EXT\}
209 @end iftex
210 @ifinfo
211 @image{lilypond/pictures/\IMAGE-FILE\,,,\EXT\}
212 @end ifinfo
213 @end macro
214
215 @macro imageId{ID, IMAGE-FILE, EXT, ALT}
216 @html
217 <div id="\ID\">
218   <img src="../pictures/\IMAGE-FILE\.\EXT\" alt="\ALT\">
219 </div>
220 @end html
221 @iftex
222 @image{pictures/\IMAGE-FILE\,,,\ALT\}
223 @end iftex
224 @ifinfo
225 @image{lilypond/pictures/\IMAGE-FILE\,,,\ALT\}
226 @end ifinfo
227 @end macro
228
229 @end ifset