bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue 1517 in lilypond: Add dots to tocItemMarkup


From: lilypond
Subject: Re: Issue 1517 in lilypond: Add dots to tocItemMarkup
Date: Tue, 15 Feb 2011 14:05:42 +0000


Comment #4 on issue 1517 by address@hidden: Add dots to tocItemMarkup
http://code.google.com/p/lilypond/issues/detail?id=1517

Bertrand,

This is great work. This will also support making a dotted LyricExtender, which is a request from the shape note community.

You should use the interval arithmetic procedures defined in scm/lily-library.scm. So, for example, pattern-width should be defined as (interval-length pattern-x-extent).

May I suggest that you substitute "height" for "length" in your variable names, since the y value is more natural as a height than a length.

You should also use interval-center for your initial y-offset assignment. You might consider changing the name of the first y-offset.

It would be more consistent with scheme idiom to avoid writing the do with the set! in the middle by using
a helper function

(define (nest-patterns pattern space count patterns)
  (if (zero? count)
       patterns
(nest-patterns pattern space (1- count) (markup patterns #:with-dimensions (cons 0 pattern-width) (cons 0 0) pattern (markup :hspace space)))))

Then in your body, you can just do

(interpet-markup layout props
(markup left.... (nest-patterns pattern space-between-patterns patterns-number) right))

Thanks,

Carl





reply via email to

[Prev in Thread] Current Thread [Next in Thread]