Response to Reinhold and Carl's concerns.
http://codereview.appspot.com/4553056/diff/1/lily/text-interface.cc File lily/text-interface.cc (right): http://codereview.appspot.com/4553056/diff/1/lily/text-interface.cc#newcode40 lily/text-interface.cc:40: int max_length = scm_to_int (ly_chain_assoc_get (ly_symbol2scm ("replacement-string-max-length"), It is needed line 50. This can be inferred from "replacement-alist". But with this property we can disable every shorthand or just those longer than replacement-string-max-length. http://codereview.appspot.com/4553056/diff/1/ly/special-characters.ly File ly/special-characters.ly (right): http://codereview.appspot.com/4553056/diff/1/ly/special-characters.ly#newcode1 ly/special-characters.ly:1: #(define special-characters-alist @Reinhold : Of course, otherwise it would be seriously annoying :o) It is called "additional-replacement" in ly/parper-defaults-init.ly. There is an example in the regression test. @Carl : I agree for the .scm file. Why do you think it is going in the wrong direction ? The main issue I see is that it makes the syntax messy. This can easily be improved: see the following response to Reinhold. http://codereview.appspot.com/4553056/diff/1/ly/special-characters.ly#newcode14 ly/special-characters.ly:14: ("\nbhyphen" . "‑") No, because '\' is sometimes an escape character (in '\t', '\n' and '\v'). \markup "\n" si the same as (markup "\n") whereas \markup "\g (or anything else)" that means (markup "\\g"). This is why there's only one backslash on the lines you commented. There's also other problems with this use of the backslash : as Mike reported, \markup { \solidus } or \lyricmode { \solidus } won't work. LilyPond will interpret \solidus as being a markup command. And this will be hard for the user to understand the difference between a command and an alias. That's why I suggest this : use another escape character for these special characters. Do you think '@' is a good idea? Beside this, I will introduce this idea of "alias" in the doc. Do you agree ? http://codereview.appspot.com/4553056/diff/1/ly/special-characters.ly#newcode36 ly/special-characters.ly:36: ("_" . " ") ; thinspace No, but there's '\_' line 55. If I remember well, thinspace is '~' in LaTeX. But the tilde is also used for tied-lyrics... A better idea would be welcome ! http://codereview.appspot.com/4553056/diff/1/ly/special-characters.ly#newcode85 ly/special-characters.ly:85: ("\\OE" . "Œ") Yes, the replacement always takes the longest string found. For these characters, I just copied LaTeX since I don't use them (except æ and œ who already have a shortcut in linux's french keyboard). But LaTeX may be wrong for this. The international community will have to improve and complete this table. Another detail : every character in this alist is defined in Century Schoolbook. http://codereview.appspot.com/4553056/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel