- (spacing-spec (cond ((and next-system
- (paper-system-title? system)
- (paper-system-title? next-system))
- (ly:output-def-lookup layout 'markup-markup-spacing))
- ((paper-system-title? system)
- (ly:output-def-lookup layout 'markup-system-spacing))
- ((and next-system
- (paper-system-title? next-system))
- (ly:output-def-lookup layout 'score-markup-spacing))
- ((not next-system)
- (ly:output-def-lookup layout 'last-bottom-spacing))
- ((ly:prob-property system 'last-in-score #f)
- (ly:output-def-lookup layout 'score-system-spacing))
- (else
- (ly:output-def-lookup layout 'system-system-spacing))))
- (last-staff-Y (car (paper-system-staff-extents system)))
- (system-Y (ly:prob-property system 'Y-offset 0.0))
- (system-X (ly:prob-property system 'X-offset 0.0))
- (next-system-Y (and next-system
- (ly:prob-property next-system 'Y-offset 0.0)))
- (next-system-X (and next-system
- (ly:prob-property next-system 'X-offset 0.0)))
- (first-staff-next-system-Y (if next-system
- (- (+ (cdr (paper-system-staff-extents next-system))
- system-Y)
- next-system-Y)
- (+ system-Y top-margin bottom-margin (- paper-height))))
+ (spacing-spec-sym (cond ((and next-system
+ (paper-system-title? system)
+ (paper-system-title? next-system))
+ 'markup-markup-spacing)
+ ((paper-system-title? system)
+ 'markup-system-spacing)
+ ((and next-system
+ (paper-system-title? next-system))
+ 'score-markup-spacing)
+ ((not next-system)
+ 'last-bottom-spacing)
+ ((ly:prob-property system 'last-in-score #f)
+ 'score-system-spacing)
+ (else
+ 'system-system-spacing)))
+ (spacing-spec (ly:output-def-lookup layout spacing-spec-sym))
+ (last-staff-Y (car (paper-system-staff-extents system)))
+ (system-Y (ly:prob-property system 'Y-offset 0.0))
+ (system-X (ly:prob-property system 'X-offset 0.0))
+ (next-system-Y (and next-system
+ (ly:prob-property next-system 'Y-offset 0.0)))
+ (next-system-X (and next-system
+ (ly:prob-property next-system 'X-offset 0.0)))
+ (first-staff-next-system-Y (if next-system
+ (- (+ (cdr (paper-system-staff-extents next-system))
+ system-Y)
+ next-system-Y)
+ (+ system-Y top-margin bottom-margin (- paper-height))))