From: Nicolas Sceaux Date: Mon, 14 Jul 2008 10:39:23 +0000 (+0200) Subject: \markuplines: fix space between \justified-lines groups X-Git-Tag: release/2.11.53-1~28^2~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b0f779f7f3445acc75816c9666adbbd427f08170;p=lilypond.git \markuplines: fix space between \justified-lines groups space-lines: Also add space around the first and last lines of a group, so that the spacing between paragraphs is even wrt to the spacing inside a paragraph. --- diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 8d956b3b56..34541d5548 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -2978,25 +2978,25 @@ when @var{label} is not found." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-public (space-lines baseline stils) - (let space-stil ((prev-stil #f) - (stils stils) + (let space-stil ((stils stils) (result (list))) - (cond ((null? stils) - (reverse! result)) - ((not prev-stil) - (space-stil (car stils) (cdr stils) (list (car stils)))) - (else - (let* ((stil (car stils)) - (dy (max (- baseline - (+ (- (interval-bound (ly:stencil-extent prev-stil Y) DOWN)) - (interval-bound (ly:stencil-extent stil Y) UP))) - 0.0)) - (new-stil (ly:make-stencil - (ly:stencil-expr stil) - (ly:stencil-extent stil X) - (cons (interval-bound (ly:stencil-extent stil Y) DOWN) - (+ (interval-bound (ly:stencil-extent stil Y) UP) dy))))) - (space-stil stil (cdr stils) (cons new-stil result))))))) + (if (null? stils) + (reverse! result) + (let* ((stil (car stils)) + (dy-top (max (- (/ baseline 1.5) + (interval-bound (ly:stencil-extent stil Y) UP)) + 0.0)) + (dy-bottom (max (+ (/ baseline 3.0) + (interval-bound (ly:stencil-extent stil Y) DOWN)) + 0.0)) + (new-stil (ly:make-stencil + (ly:stencil-expr stil) + (ly:stencil-extent stil X) + (cons (- (interval-bound (ly:stencil-extent stil Y) DOWN) + dy-bottom) + (+ (interval-bound (ly:stencil-extent stil Y) UP) + dy-top))))) + (space-stil (cdr stils) (cons new-stil result)))))) (define-builtin-markup-list-command (justified-lines layout props args) (markup-list?)