lilypond-devel
[Top][All Lists]
Advanced

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

Patch for fill-line


From: Han-Wen Nienhuys
Subject: Patch for fill-line
Date: Fri, 4 Feb 2005 21:06:42 +0100

address@hidden writes:
> Hi,
> 
> the current fill-line implementation in the 2.5 branch makes it almost 
> impossible
> to align for example the title and instrument header. Therefore I 
> propose the
> attached implementation in the attached patch.
> 



        +       
        +(define (get-fill-space word-count line-width word-widths)
        +       (cond
        +               ((= (length word-widths) word-count)
        +                       (cons 
        +                               (- (- (/ line-width (- word-count 1)) 
(car word-widths)) (/ (car (cdr word-widths)) 2))
        +                               (get-fill-space word-count line-width 
(cdr word-widths))))
        +               ((= (length word-widths) 2)
        +                       (list (- (/ line-width (- word-count 1)) (+ (/ 
(car word-widths) 2) (car (cdr word-widths)))) 0))
        +               (else
        +                       (cons 
        +                               (- (/ line-width (- word-count 1)) (/ 
(+ (car word-widths) (car (cdr word-widths))) 2))
        +                               (get-fill-space word-count line-width 
(cdr word-widths))))))


can you document what this supposed to do?
btw, there is a procedure

  1-

(decrement by 1), which will simplify this a bit  
 
 (define (font-markup qualifier value)


> See http://people.ee.ethz.ch/~chitz/fill-line-test.pdf 
> (http://people.ee.ethz.ch/~chitz/fill-line-test.ly) for a testcase

definitely an improvement!

-- 

 Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen 





reply via email to

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