Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Delta Between Two Patch Sets: ly/text-replacements.ly

Issue 4553056: New alist to replace special characters. (Closed)
Left Patch Set: Fix add-text-replacements stacking and add a \replace markup command. Created 13 years, 7 months ago
Right Patch Set: Partially reverting one of Neil's changes. Created 13 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « ly/paper-defaults-init.ly ('k') | scm/define-grob-properties.scm » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 %%%% This file is part of LilyPond, the GNU music typesetter.
2 %%%%
3 %%%% Copyright (C) 2011 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.15.13"
19
20 #(define (add-text-replacements! alist)
21 (assoc-set! text-font-defaults 'replacement-alist
22 (cdaar
23 (internal-add-text-replacements (list text-font-defaults) alist))))
24
25 #(define (include-special-characters)
26 (add-text-replacements!
27 '(;; Punctuation
28 ("&hellip;" . "…")
29 ("&ndash;" . "–")
30 ("&mdash;" . "—")
31 ("&iexcl;" . "¡")
32 ("&iquest;" . "¿")
33 ("&solidus;" . "∕") ; this is not a slash,
34 ; contrary to what is said in Unicode.
35
36 ;; French, German and English quotes open/close
37 ("&flq;" . "‹")
38 ("&frq;" . "›")
39 ("&flqq;" . "«")
40 ("&frqq;" . "»")
41 ("&glq;" . "‚")
42 ("&grq;" . "‘")
43 ("&glqq;" . "„")
44 ("&grqq;" . "“")
45 ("&elq;" . "‘")
46 ("&erq;" . "’")
47 ("&elqq;" . "“")
48 ("&erqq;" . "”")
49
50 ;; Word dividers
51 ("&ensp;" . " ")
52 ("&emsp;" . " ")
53 ("&thinsp;" . " ")
54 ("&nbsp;" . " ")
55 ("&nnbsp;" . " ") ; narrow non-breaking space
56 ("&zwj;" . "‍")
57 ("&zwnj;" . "‌")
58 ("&middot;" . "·") ; interpunct
59
60 ;; General typography
61 ("&bull;" . "•")
62 ("&copyright;" . "©")
63 ("&registered;" . "®")
64 ("&trademark;" . "™")
65 ("&dagger;" . "†")
66 ("&Dagger;" . "‡")
67 ("&numero;" . "№")
68 ("&ordf;" . "ª")
69 ("&ordm;" . "º")
70 ("&para;" . "¶")
71 ("&sect;" . "§")
72 ("&deg;" . "°")
73 ("&numero;" . "№")
74 ("&permil;" . "‰")
75 ("&brvbar;" . "¦")
76
77 ;; Diacritics
78 ("&acute;" . "´")
79 ("&acutedbl;" . "˝")
80 ("&grave;" . "`")
81 ("&breve;" . "˘")
82 ("&caron;" . "ˇ")
83 ("&cedilla;" . "¸")
84 ("&circumflex;" . "^")
85 ("&diaeresis;" . "¨")
86 ("&macron;" . "¯")
87
88 ;; Non-ASCII Letters (Excluding Accented Letters)
89 ("&aa;" . "å")
90 ("&AA;" . "Å")
91 ("&ae;" . "æ")
92 ("&AE;" . "Æ")
93 ("&dh;" . "ð")
94 ("&DH;" . "Ð")
95 ("&dj;" . "đ")
96 ("&DJ;" . "Đ")
97 ("&l;" . "ł")
98 ("&L;" . "Ł")
99 ("&ng;" . "ŋ")
100 ("&NG;" . "Ŋ")
101 ("&o;" . "ø")
102 ("&O;" . "Ø")
103 ("&oe;" . "œ")
104 ("&OE;" . "Œ")
105 ("&s;" . "ſ")
106 ("&ss;" . "ß")
107 ("&th;" . "þ")
108 ("&TH;" . "Þ")
109
110 ;; Mathematical symbols
111 ("&plus;" . "+")
112 ("&minus;" . "−")
113 ("&times;" . "×")
114 ("&div;" . "÷")
115 ("&sup1;" . "¹")
116 ("&sup2;" . "²")
117 ("&sup3;" . "³")
118 ("&sqrt;" . "√")
119 ("&increment;" . "∆")
120 ("&infty;" . "∞")
121 ("&sum;" . "∑")
122 ("&pm;" . "±")
123 ("&bulletop;" . "∙")
124 ("&partial;" . "∂")
125 ("&neg;" . "¬")
126
127 ;; Currency symbols
128 ("&currency;" . "¤")
129 ("&dollar;" . "$")
130 ("&euro;" . "€")
131 ("&pounds;" . "£")
132 ("&yen;" . "¥")
133 ("&cent;" . "¢"))))
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b