[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New alist to replace special characters. (issue4553056)

From: bordage . bertrand
Subject: Re: New alist to replace special characters. (issue4553056)
Date: Mon, 23 May 2011 21:32:27 +0000

Response to Reinhold and Carl's concerns.
File lily/ (right):
lily/ 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.
File ly/ (right):
ly/ #(define special-characters-alist
@Reinhold :
Of course, otherwise it would be seriously annoying :o)
It is called "additional-replacement" in 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.
ly/ ("\nbhyphen" . "‑")
No, because '\' is sometimes an escape character (in '\t', '\n' and
\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
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 ?
ly/ ("_" . " ") ; 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 !
ly/ ("\\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

Another detail : every character in this alist is defined in Century

reply via email to

[Prev in Thread] Current Thread [Next in Thread]