[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Special characters: make text-replacements list longer
From: |
PNEU |
Subject: |
Special characters: make text-replacements list longer |
Date: |
Sat, 12 Apr 2014 17:23:53 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Dear LilyPond Community,
I would like to suggest a little enhancement to make special characters
easier to insert.
I was getting tired of using these methods (c \mark \markup {\concat {"B"
\char ##xd6 "u" \char ##x159 "r" \char ##xe9 "e"} –_&OE;&hellip }) to
insert special characters in my lyrics, titles etc.
So I changed my text-replacements.ly file to this (see below 1), changing
all characters to their equivalent in I-dont-know-what other encoding. It
works surprisingly well! You just have to enter the characters in plain text
in LilyPad and out they come in the PDF.
I did have an interference with the default tagline -- the dash would not
get printed -- so I changed my default tagline accordingly (in file
titling-init.ly), see below 2.
If it is not too risky you might really consider switching the default
text-replacement.ly file to this. Indeed it is currently really difficult
for French / German / Spanish etc users to insert special characters in
LilyPond.
Thanks a lot, good luck,
PNEU
##### \LilyPond 2.18.2\usr\share\lilypond\current\ly\text-replacements.ly #####
\version "2.16.0"
#(define (add-text-replacements! alist)
(set! text-font-defaults
(assoc-set! text-font-defaults 'replacement-alist
(cdaar
(internal-add-text-replacements (list text-font-defaults)
alist)))))
#(define (include-special-characters)
(add-text-replacements!
'(;; Punctuation
("…" . "…")
("–" . "–")
("—" . "—")
("¡" . "¡")
("¿" . "¿")
("&solidus;" . "∕") ; this is not a slash,
; contrary to what is said in Unicode.
;; French, German and English quotes open/close
("&flq;" . "‹")
("&frq;" . "›")
("&flqq;" . "«")
("&frqq;" . "»")
("&glq;" . "‚")
("&grq;" . "‘")
("&glqq;" . "„")
("&grqq;" . "“")
("&elq;" . "‘")
("&erq;" . "’")
("&elqq;" . "“")
("&erqq;" . "â€")
;; Word dividers
(" " . " ")
(" " . " ")
(" " . " ")
(" " . " ")
("&nnbsp;" . " ") ; narrow non-breaking space
("‍" . "â€")
("‌" . "‌")
("·" . "·") ; interpunct
;; General typography
("•" . "•")
("©right;" . "©")
("®istered;" . "®")
("&trademark;" . "â„¢")
("†" . "†")
("‡" . "‡")
("№" . "â„–")
("ª" . "ª")
("º" . "º")
("¶" . "¶")
("§" . "§")
("°" . "°")
("№" . "â„–")
("‰" . "‰")
("¦" . "¦")
;; Diacritics
("´" . "´")
("´dbl;" . "Ë")
("`" . "`")
("˘" . "˘")
("ˇ" . "ˇ")
("¸la;" . "¸")
("&circumflex;" . "^")
("&diaeresis;" . "¨")
("¯on;" . "¯")
;; Non-ASCII Letters (Excluding Accented Letters)
("&aa;" . "Ã¥")
("&AA;" . "Ã…")
("&ae;" . "æ")
("&AE;" . "Æ")
("&dh;" . "ð")
("&DH;" . "Ã")
("&dj;" . "Ä‘")
("&DJ;" . "Ä")
("&l;" . "Å‚")
("&L;" . "Å")
("&ng;" . "Å‹")
("&NG;" . "ÅŠ")
("&o;" . "ø")
("&O;" . "Ø")
("&oe;" . "Å“")
("&OE;" . "Å’")
("&s;" . "Å¿")
("&ss;" . "ß")
("&th;" . "þ")
("&TH;" . "Þ")
;; Mathematical symbols
("+" . "+")
("−" . "−")
("×" . "×")
("÷" . "÷")
("¹" . "¹")
("²" . "²")
("³" . "³")
("&sqrt;" . "√")
("&increment;" . "∆")
("&infty;" . "∞")
("∑" . "∑")
("±" . "±")
("&bulletop;" . "∙")
("&partial;" . "∂")
("&neg;" . "¬")
;; Currency symbols
("¤cy;" . "¤")
("$" . "$")
("€" . "€")
("£s;" . "£")
("¥" . "Â¥")
("¢" . "¢")
;; My symbols, added
("¡" . "Ž")
("¢" . "¢")
("£" . "£")
("¥" . "Â¥")
("¦" . "Ĭ")
("§" . "§")
("¨" . "Ŭ")
("©" . "©")
("ª" . "Ǧ")
("«" . "«")
("¬" . "ÅŠ")
("" . "Â")
("®" . "®")
("¯" . "Ç‘")
("°" . "°")
("±" . "ž")
("²" . "²")
("³" . "³")
("´" . "´")
("µ" . "µ")
("¶" . "Ä")
("·" . "·")
("¸" . "Å")
("¹" . "¹")
("º" . "ǧ")
("»" . "»")
("¼" . "Å‹")
("½" . "½")
("¾" . "Ÿ")
("¿" . "Ç’")
("À" . "À")
("Á" . "Ã")
("Â" . "Â")
("Ã" . "Ã")
("Ä" . "Ä")
("Å" . "Ã…")
("Æ" . "Æ")
("Ç" . "Ç")
("È" . "È")
("É" . "É")
("Ê" . "Ê")
("Ë" . "Ë")
("Ì" . "ÃŒ")
("Í" . "Ã")
("Î" . "ÃŽ")
("Ï" . "Ã")
("Ð" . "Äž")
("Ñ" . "Ñ")
("Ò" . "Ã’")
("Ó" . "Ó")
("Ô" . "Ô")
("Õ" . "Õ")
("Ö" . "Ö")
("×" . "Ã")
("Ø" . "ÆŸ")
("Ù" . "Ù")
("Ú" . "Ú")
("Û" . "Û")
("Ü" . "Ü")
("Ý" . "İ")
("Þ" . "Åž")
("ß" . "ß")
("à" . "Ã ")
("á" . "á")
("â" . "â")
("ã" . "ã")
("ä" . "ä")
("å" . "Ã¥")
("æ" . "É™")
("ç" . "ç")
("è" . "è")
("é" . "é")
("ê" . "ê")
("ë" . "ë")
("ì" . "ì")
("í" . "Ã")
("î" . "î")
("ï" . "ï")
("ð" . "ÄŸ")
("ñ" . "ñ")
("ò" . "ò")
("ó" . "ó")
("ô" . "ô")
("õ" . "õ")
("ö" . "ö")
("÷" . "ý")
("ø" . "ɵ")
("ù" . "ù")
("ú" . "ú")
("û" . "û")
("ü" . "ü")
("ý" . "ı")
("þ" . "ÅŸ")
("ÿ" . "ÿ")
("Œ" . "ÂŒ")
("œ" . "œ")
("Š" . "Š")
("š" . "š")
("Ÿ" . "Ÿ")
("ƒ" . "ƒ")
;("–" . "–")
;("—" . "—")
("‘" . "‘")
("’" . "Â’")
("‚" . "‚")
("“" . "“")
("”" . "”")
("„" . "„")
("†" . "†")
("‡" . "‡")
("•" . "•")
("…" . "Â…")
("‰" . "‰")
("€" . "€")
("™" . "™"))))
###### in file \LilyPond
2.18.2\usr\share\lilypond\current\ly\titling-init.ly ######
tagline = \markup {
\pad-to-box #'(0 . 0) #'(0 . 3)
{ \with-url
#"http://lilypond.org/"
\line {
%% 2014 = em dash.
#(format #f "Music engraving by LilyPond ~a -- www.lilypond.org"
(lilypond-version)
)
}
}
}
- Special characters: make text-replacements list longer,
PNEU <=