+2006-06-01 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ * scm/stencil.scm (write-system-signature): escape newlines too.
+
2006-01-01 Graham Percival <gpermus@gmail.com>
* Documentation/user/music-glossary.tely: Spanish updates
empty_interval = (INFTY, -INFTY)
empty_bbox = (empty_interval, empty_interval)
+def interval_is_empty (i):
+ return i[0] > i[1]
+
def interval_length (i):
return max (i[1]-i[0], 0)
return (max (i1[0], i2[0]),
min (i1[1], i2[1]))
+def bbox_is_empty (b):
+ return (interval_is_empty (b[0])
+ or interval_is_empty (b[1]))
+
def bbox_union (b1, b2):
return (interval_union (b1[X_AXIS], b2[X_AXIS]),
interval_union (b2[Y_AXIS], b2[Y_AXIS]))
self.back_link_dict = {}
for g in system1.grobs ():
+
+ ## skip empty bboxes.
+ if bbox_is_empty (g.bbox):
+ continue
+
closest = system2.closest (g.name, g.centroid)
self.link_list_dict.setdefault (closest, [])
p (scorify-music m p)))))
%(papermod)s
-
-\relative c {
+<<
+\new Staff \relative c {
+ c^"%(userstring)s" %(extragrob)s
+ }
+\new Staff \relative c {
c^"%(userstring)s" %(extragrob)s
}
+>>
"""
dicts = [{ 'papermod' : '',
(define (pythonic-string expr)
"escape quotes and slashes for python consumption"
- (regexp-substitute/global #f "([\\\\'\"])" (format "~a" expr) 'pre "\\" 1 'post))
+ (regexp-substitute/global #f "([\n\\\\'\"])" (format "~a" expr) 'pre "\\" 1 'post))
(define (pythonic-pair expr)
(format "(~a,~a)"