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