2009/8/1 Mark Polesky <markpole...@yahoo.com>: > > Mark Polesky wrote: > >> > Mark, do you want to take care of removing the \pad-markup command? >> > Please remember to add a convert-ly rule, and a NEWS item. >> >> These are things I've not done before, but perhaps I'll give it a >> try! > > Okay, looking at earlier rules for guidance, I'm surprised to see so > many different formats for this. Here are some examples that I see > that I thought might > be similar to the convert-rule in question: > > str = str.replace ("setHairpinDim", "dimHairpin")
If the conversion is likely to be unambiguous, this is the simplest method: it's highly unlikely this rule will generate a false match. > str = re.sub (r"([\\:]+)center-align", r"\1center-column", str) There are several places in the docs where `center-align' shouldn't be converted to `center-column' (e.g., comments in snippets); this rule ensures only markup commands are picked up (backslashed or #:). > str = re.sub (r"hcenter(\s+)", r"center-align\1", str) This rule expects a space after `hcenter' to prevent \hcenter-in from being converted (though it doesn't account for make-hcenter-markup). > str = str.replace ("pad-markup", "pad-around") I think this will be fine, since `pad-markup' is unlikely to be found outside its present usage; it also picks up #:pad-markup and `make-pad-markup-markup'. :) Regards, Neil _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel