From: David Kastrup Date: Sat, 25 May 2013 11:06:06 +0000 (+0200) Subject: Add convert-ly rule increasing \vspace inside of \column X-Git-Tag: release/2.17.19-1~5^2~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7ede19c76ff88110e1af1975e33bc0041680a0b5;p=lilypond.git Add convert-ly rule increasing \vspace inside of \column --- diff --git a/python/convertrules.py b/python/convertrules.py index 11cd1729fd..aee0530e9c 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3560,6 +3560,27 @@ def conv(str): str = re.sub ('cueClefOctavationStyle', 'cueClefTranspositionStyle', str) return str +@rule((2, 17, 19), r"\column { \vspace #2 } -> \column { \combine \null \vspace #2 }") +def conv(str): + def vspace_replace(m): + +# vspace now always adds space and does not, for example, change the +# impact of either baselineskip or descenders on the line above. +# +# We can't simulate the old behavior in a simpler manner. A command +# of its own is not really warranted since this behavior combines +# badly enough with other spacing considerations (like baselineskip +# and descenders) as to make it not all that useful. So this +# conversion rule is here more for compatibility's sake rather than +# preserving desirable behavior. + + str = re.sub (r"(\\\\?)vspace(\s)", r"\1combine \1null \1vspace\2", m.group(0)) + return str + + str = re.sub (r"\\(?:left-|right-|center-|)column\s*\{" + brace_matcher (20) + r"\}", + vspace_replace, str) + return str + # Guidelines to write rules (please keep this at the end of this file) # # - keep at most one rule per version; if several conversions should be done,