]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/common-macros.itexi
Merge branch 'master' of ssh+git://git.sv.gnu.org/srv/git/lilypond
[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 @emph{\TEXT\}
71 @end macro
72 @end ifclear
73
74 @c   ***** Indexing *****
75
76 @c Don't remove the `@c' within the macro definition!  See section 19.3,
77 @c `Macro Details and Caveats', in the texinfo info file for explanation.
78
79 @macro funindex {TEXT}
80 @findex \TEXT\
81 @kindex \TEXT\
82 @c
83 @end macro
84
85
86 @c   ***** Macros specific to translated docs *****
87
88 @c ugh, cannot set/define global variable 'translationof' in any way :-(
89
90 @iftex
91
92 @macro translationof{TEXT}
93 @end macro
94
95 @end iftex
96
97 @ifinfo
98
99 @macro translationof{TEXT}
100 @set translationof \TEXT\
101 @end macro
102
103 @end ifinfo
104
105 @ifhtml
106
107 @ifset bigpage
108 @macro untranslated
109 @end macro
110 @end ifset
111
112 @ifclear bigpage
113 @macro untranslated
114 UNTRANSLATED NODE: IGNORE ME
115 @end macro
116 @end ifclear
117
118 @end ifhtml
119
120 @ifnothtml
121
122 @macro untranslated
123 @end macro
124
125 @end ifnothtml
126
127
128 @c  ***** Macros specific to the web site *****
129
130 @ifset web
131
132 @macro help{TEXT}
133 @html
134 <div class="help">
135 <strong>
136   <span style="text-decoration:blink">Help wanted:</span>
137 </strong> \TEXT\
138 </div>
139 @end html
140 @end macro
141
142 @macro divId {ID}
143 @html
144 <div id="\ID\">
145 @end html
146 @end macro
147
148 @macro divClass {CLASS}
149 @html
150 <div class="\CLASS\">
151 @end html
152 @end macro
153
154 @macro divEnd
155 @c keep the space for proper nesting of </p>
156
157 @html
158 </div>
159 @end html
160 @end macro
161
162
163 @c not strictly necessary, but it makes things easier for updating news
164 @macro newsItem
165 @html
166 <div class="news-item">
167 @end html
168 @end macro
169
170 @macro newsEnd
171 @c keep the space for proper nesting of </p>
172
173 @html
174 </div>
175 @end html
176 @end macro
177
178
179
180 @macro imageClickable{IMAGE-FILE, MORE-TEXT, CLICK-FILE, POSITION}
181 @html
182 <div class="float-\POSITION\">
183   <a class="clickable" href="\CLICK-FILE\">
184     <img src="\IMAGE-FILE\" alt="\IMAGE-FILE\">
185   </a>
186   <p style="text-align: center">
187     \MORE-TEXT\
188   </p>
189 </div>
190 @end html
191 @ifnothtml
192 FIXME: broken image
193 @c @image{\IMAGE-FILE\}
194 @end ifnothtml
195 @end macro
196
197 @macro imageFloat{IMAGE-FILE, POSITION}
198 @html
199 <img class="float-\POSITION\" src="pictures/\IMAGE-FILE\" alt="\IMAGE-FILE\">
200 @end html
201 @ifnothtml
202 FIXME: broken image
203 @c @image{\IMAGE-FILE\}
204 @end ifnothtml
205 @end macro
206
207 @macro imageId{ID, IMAGE-FILE, ALT}
208 @html
209 <div id="\ID\">
210   <img src="pictures/\IMAGE-FILE\" alt="\ALT\">
211 </div>
212 @end html
213 @ifnothtml
214 FIXME: broken image
215 @c @image{\IMAGE-FILE\}
216 @end ifnothtml
217 @end macro
218
219 @end ifset