]> git.donarmstrong.com Git - lilypond.git/blob - ly/text-replacements.ly
Doc-es: various updates.
[lilypond.git] / ly / text-replacements.ly
1 %%%% This file is part of LilyPond, the GNU music typesetter.
2 %%%%
3 %%%% Copyright (C) 2011--2015 Bertrand Bordage <bordage.bertrand@gmail.com>
4 %%%%
5 %%%% LilyPond is free software: you can redistribute it and/or modify
6 %%%% it under the terms of the GNU General Public License as published by
7 %%%% the Free Software Foundation, either version 3 of the License, or
8 %%%% (at your option) any later version.
9 %%%%
10 %%%% LilyPond is distributed in the hope that it will be useful,
11 %%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
12 %%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 %%%% GNU General Public License for more details.
14 %%%%
15 %%%% You should have received a copy of the GNU General Public License
16 %%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
17
18 \version "2.16.0"
19
20 #(define (add-text-replacements! alist)
21    (set! text-font-defaults
22          (assoc-set! text-font-defaults 'replacement-alist
23                      (cdaar
24                       (internal-add-text-replacements (list text-font-defaults) alist)))))
25
26 #(define (include-special-characters)
27    (add-text-replacements!
28      '(;; Punctuation
29        ("&hellip;" . "…")
30        ("&ndash;" . "–")
31        ("&mdash;" . "—")
32        ("&iexcl;" . "¡")
33        ("&iquest;" . "¿")
34        ("&solidus;" . "∕") ; this is not a slash,
35                            ; contrary to what is said in Unicode.
36
37        ;; French, German and English quotes open/close
38        ("&flq;" . "‹")
39        ("&frq;" . "›")
40        ("&flqq;" . "«")
41        ("&frqq;" . "»")
42        ("&glq;" . "‚")
43        ("&grq;" . "‘")
44        ("&glqq;" . "„")
45        ("&grqq;" . "“")
46        ("&elq;" . "‘")
47        ("&erq;" . "’")
48        ("&elqq;" . "“")
49        ("&erqq;" . "”")
50
51        ;; Word dividers
52        ("&ensp;" . " ")
53        ("&emsp;" . " ")
54        ("&thinsp;" . " ")
55        ("&nbsp;" . " ")
56        ("&nnbsp;" . " ") ; narrow non-breaking space
57        ("&zwj;" . "‍")
58        ("&zwnj;" . "‌")
59        ("&middot;" . "·") ; interpunct
60
61        ;; General typography
62        ("&bull;" . "•")
63        ("&copyright;" . "©")
64        ("&registered;" . "®")
65        ("&trademark;" . "™")
66        ("&dagger;" . "†")
67        ("&Dagger;" . "‡")
68        ("&numero;" . "№")
69        ("&ordf;" . "ª")
70        ("&ordm;" . "º")
71        ("&para;" . "¶")
72        ("&sect;" . "§")
73        ("&deg;" . "°")
74        ("&numero;" . "№")
75        ("&permil;" . "‰")
76        ("&brvbar;" . "¦")
77
78        ;; Diacritics
79        ("&acute;" . "´")
80        ("&acutedbl;" . "˝")
81        ("&grave;" . "`")
82        ("&breve;" . "˘")
83        ("&caron;" . "ˇ")
84        ("&cedilla;" . "¸")
85        ("&circumflex;" . "^")
86        ("&diaeresis;" . "¨")
87        ("&macron;" . "¯")
88
89        ;; Non-ASCII Letters (Excluding Accented Letters)
90        ("&aa;" . "å")
91        ("&AA;" . "Å")
92        ("&ae;" . "æ")
93        ("&AE;" . "Æ")
94        ("&auml;" . "ä")
95        ("&Auml;" . "Ä")
96        ("&dh;" . "ð")
97        ("&DH;" . "Ð")
98        ("&dj;" . "đ")
99        ("&DJ;" . "Đ")
100        ("&l;" . "ł")
101        ("&L;" . "Ł")
102        ("&ng;" . "ŋ")
103        ("&NG;" . "Ŋ")
104        ("&o;" . "ø")
105        ("&O;" . "Ø")
106        ("&oe;" . "œ")
107        ("&OE;" . "Œ")
108        ("&ouml;" . "ö")
109        ("&Ouml;" . "Ö")
110        ("&s;" . "ſ")
111        ("&ss;" . "ß")
112        ("&th;" . "þ")
113        ("&TH;" . "Þ")
114        ("&uuml;" . "ü")
115        ("&Uuml;" . "Ü")
116
117        ;; Mathematical symbols
118        ("&plus;" . "+")
119        ("&minus;" . "−")
120        ("&times;" . "×")
121        ("&div;" . "÷")
122        ("&sup1;" . "¹")
123        ("&sup2;" . "²")
124        ("&sup3;" . "³")
125        ("&sqrt;" . "√")
126        ("&increment;" . "∆")
127        ("&infty;" . "∞")
128        ("&sum;" . "∑")
129        ("&pm;" . "±")
130        ("&bulletop;" . "∙")
131        ("&partial;" . "∂")
132        ("&neg;" . "¬")
133
134        ;; Currency symbols
135        ("&currency;" . "¤")
136        ("&dollar;" . "$")
137        ("&euro;" . "€")
138        ("&pounds;" . "£")
139        ("&yen;" . "¥")
140        ("&cent;" . "¢"))))