On May 23, 2011, at 12:38 PM, bordage.bertr...@gmail.com wrote: > This prints every character with its shorthand, but works bad because of > '\t', '\v' and '\n' : > > \version "2.15.0" > \include "special-characters.ly" > #(define-markup-list-command (show-special-characters layout props) () > (interpret-markup-list layout props > (map (lambda (pair) > (markup #:fill-line ( > #:null > #:override > > '(replacement-string-max-length . 0) > (car pair) > (car pair) > #:null))) > special-characters-alist))) > \markuplines \show-special-characters
Good work! A couple things : (1) If I want to write "\emdash is a command in lilypond", that won't work (I think) with this patch. You need to create either a ("\\\\" . "\\") special character or another workaround for the backslash. (2) For ligatures that arrive at the end of the word like in some German texts, you'll need to figure out where the ligature falls in the word. Writing a single exception to do this in C++ is easy, but if ligatures are any hairier than this (i.e. if in Nabakov's Zemblan there is an ie ligature except after c), then you'd be better off porting the whole thing to Scheme and doing it via regular expressions or some other sorta text replacement algorithm. The added advantage of this is that users can specify their own rules. (3) Newbs will invariably learn about this feature, want to use it, and then complain that the ligature they want is in a different font than Century Schoolbook in the PDF. Perhaps lilypond should issue a warning if a character is found in a font that is not the one you currently have selected like "Warning: Charater `foo' found, but not in the current font." Cheers, MS _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel