]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/common-macros.itexi
Fix Issue 2146 "Illegal entry in bfrange block in ToUnicode CMap"
[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 @c Trick to use with proper font mappings the same NCSB fonts as
14 @c LilyPond instead of those provided by TeX distribution
15 @tex
16 \ifpdf
17   \pdfmapfile{=lilypond.map}
18 \fi
19 @end tex
20
21
22 @c   ***** Displaying text *****
23
24 @c We need this since @q{\} doesn't work with makeinfo 4.11 --
25 @c say @q{@bs{}} instead.
26
27 @macro bs
28 \\
29 @end macro
30
31
32 @ifnotinfo
33
34 @macro notation{TEXT}
35 @var{\TEXT\}
36 @end macro
37
38 @end ifnotinfo
39
40 @ifinfo
41
42 @macro notation{TEXT}
43 \TEXT\
44 @end macro
45
46 @end ifinfo
47
48
49 @macro smallspace
50 @sp 1
51 @end macro
52
53
54 @c   ***** Displaying images not generated by lilypond-book *****
55
56 @c Current installation setup of Info docs requires that all images are
57 @c expected to be found in the `lilypond/' subdirectory.  `lilypond-book'
58 @c already generates proper @image commands for images of music; these
59 @c macro definitions do the same for other images.
60
61 @ifnotinfo
62
63 @macro sourceimage{FILENAME,WIDTH,HEIGHT,ALTTEXT}
64 @image{pictures/\FILENAME\,\WIDTH\,\HEIGHT\,\ALTTEXT\}
65 @end macro
66
67 @end ifnotinfo
68
69 @ifinfo
70
71 @macro sourceimage{FILENAME,WIDTH,HEIGHT,ALTTEXT}
72 @image{lilypond/pictures/\FILENAME\,\WIDTH\,\HEIGHT\,\ALTTEXT\}
73 @end macro
74
75 @end ifinfo
76
77
78 @c   ***** Headers *****
79
80 @ifclear snippets-sections
81 @macro lydoctitle {TEXT}
82 @need 600
83 @emph{\TEXT\}
84 @end macro
85 @end ifclear
86
87 @c   ***** Indexing *****
88
89 @c Don't remove the `@c' within the macro definition!  See section 19.3,
90 @c `Macro Details and Caveats', in the texinfo info file for explanation.
91
92 @macro funindex {TEXT}
93 @findex \TEXT\
94 @kindex \TEXT\
95 @c
96 @end macro
97
98
99 @c   ***** Macros specific to translated docs *****
100
101 @c ugh, cannot set/define global variable 'translationof' in any way :-(
102
103 @iftex
104
105 @macro translationof{TEXT}
106 @end macro
107
108 @end iftex
109
110 @ifinfo
111
112 @macro translationof{TEXT}
113 @set translationof \TEXT\
114 @end macro
115
116 @end ifinfo
117
118 @ifhtml
119
120 @ifset bigpage
121 @macro untranslated
122 @end macro
123 @end ifset
124
125 @ifclear bigpage
126 @macro untranslated
127 UNTRANSLATED NODE: IGNORE ME
128 @end macro
129 @end ifclear
130
131 @end ifhtml
132
133 @ifnothtml
134
135 @macro untranslated
136 @end macro
137
138 @end ifnothtml
139
140
141 @c  ***** Macros specific to the web site *****
142
143 @ifset web
144
145 @c make link to bugfixes for news.itexi
146 @c use underscores for version: @bugfixes{2_13_13,}
147 @c use specifier arg when listing multiple versions
148 @c (see September 20, 2007 post for an example)
149 @macro bugfixes{version,specifier}
150 @uref{http://code.google.com/p/lilypond/issues/list?can=1&q=fixed_\version\&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary,Bugfixes
151 \specifier\}
152 @end macro
153
154 @macro divId {ID}
155 @html
156 <div id="\ID\">
157 @end html
158 @end macro
159
160 @macro divClass {CLASS}
161 @html
162 <div class="\CLASS\">
163 @end html
164 @end macro
165
166 @macro divEnd
167 @c keep the space for proper nesting of </p>
168
169 @html
170 </div>
171 @end html
172 @end macro
173
174 @ifclear web_version
175   @ifclear bigpage
176     @macro docLink{name,target,webLink}
177       @uref{../\target\, \name\}
178     @end macro
179   @end ifclear
180   @ifset bigpage
181     @macro docLink{name,target,webLink}
182       @uref{\target\, \name\}
183     @end macro
184   @end ifset
185 @end ifclear
186 @ifset web_version
187   @macro docLink{name,target,webLink}
188     \webLink\
189   @end macro
190 @end ifset
191
192 @macro miscLink{MISC-FILE,MISC-TEXT}
193 @uref{http://lilypond.org/website/misc/\MISC-FILE\,\MISC-TEXT\}
194 @end macro
195
196 @macro spanClass {CLASS}
197 @html
198 <span class="\CLASS\">
199 @end html
200 @end macro
201
202 @macro spanEnd
203 @c keep the space for proper nesting of </p>
204
205 @html
206 </span>
207 @end html
208 @end macro
209
210
211 @c not strictly necessary, but it makes things easier for updating news
212 @macro newsItem
213 @html
214 <div class="news-item">
215 @end html
216 @end macro
217
218 @macro newsEnd
219 @c keep the space for proper nesting of </p>
220
221 @html
222 </div>
223 @end html
224 @end macro
225
226
227 @macro imageClickable{IMAGE-FILE, EXT, MORE-TEXT, CLICK-FILE, CLICK-EXT, POSITION}
228 @html
229 <div class="float-\POSITION\">
230   <a class="clickable" href="pictures/\CLICK-FILE\.\CLICK-EXT\">
231     <img src="pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
232   </a>
233   <p style="text-align: center">
234     \MORE-TEXT\
235   </p>
236 </div>
237 @end html
238 @iftex
239 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
240 @end iftex
241 @ifinfo
242 @image{lilypond/pictures/\IMAGE-FILE\,,,\IMAGE-FILE\}
243 @end ifinfo
244 @end macro
245
246 @macro imageFloat{IMAGE-FILE, EXT, POSITION}
247 @html
248 <img class="float-\POSITION\" src="pictures/\IMAGE-FILE\.\EXT\" alt="\IMAGE-FILE\">
249 @end html
250 @iftex
251 @image{pictures/\IMAGE-FILE\,,,\IMAGE-FILE\,\EXT\}
252 @end iftex
253 @ifinfo
254 @image{lilypond/pictures/\IMAGE-FILE\,,,\EXT\}
255 @end ifinfo
256 @end macro
257
258 @macro imageId{ID, IMAGE-FILE, EXT, ALT}
259 @html
260 <div id="\ID\">
261   <img src="pictures/\IMAGE-FILE\.\EXT\" alt="\ALT\">
262 </div>
263 @end html
264 @iftex
265 @image{pictures/\IMAGE-FILE\,,,\ALT\}
266 @end iftex
267 @ifinfo
268 @image{lilypond/pictures/\IMAGE-FILE\,,,\ALT\}
269 @end ifinfo
270 @end macro
271
272 @end ifset