Hi Bernhard,

unfortunately I don't have much time at the moment (and there's always the chance that Jean or someone else more knowledgeable than me is already working on an exhaustive answer), but there's one thing I'd like to point out:

#(define-markup-command (strut-line layout props line)
  (markup?)
  "add strut to the end of a line to ensure correct line spacing"
  (interpret-markup layout props
   (markup
    (make-combine-markup
     (make-line-markup (list line))
     (make-transparent-markup "Ij")))))

Isn't this just

#(define-markup-command (strut-line layout props line)
  (markup?)
  "add strut to the end of a line to ensure correct line spacing"
  (interpret-markup layout props
   (markup #:combine line #:transparent "Ij")))

?

Also note that your function, if called with \strut-line { hello world }, actually adds your invisible strut to every word of the line. (Just remove the make-transparent-markup in your function to see this, or, more easuily, remove the #:transparent in my version). Compare:

\markup \strut-line { hello world }
\markup \strut-line \line { hello world }

This difference (I think) originates in the way LilyPond applies markup functions to explicit markups of the form { some word and some other }, or put differently: Where the implicit \line is put, and how a function expecting a single markup is applied to a list of markups.

But note what changes if you replace the markup? predicate in your function definition by markup-list?.

Lukas



Reply via email to