On 2017/06/09 13:36:53, dak wrote:
Ok, I've taken another look at something that should help with this
amount of
fine-grained definitions.
LGTM. Although I'm still new to understanding scheme macros, I think I understand the gist of what's going on.
Do you think that the following macro markup-when would be fine-grained enough to forego these kind of definition?
You mean so the user would use this markup-when macro to define their own 'on-page-greater-than' and/or 'on-page-less-than' (like you've shown), rather than adding them to LilyPond? If so, that seems fine to me. They seem like fairly rare use cases. Would make a good snippet for the LSR or docs, so it can be found and used when needed.
I demonstrate it for implementing on-page-greater-than but of course one may use it
directly. Directly like this I assume? (Which works.) \paper { #(set-paper-size "a7landscape") oddFooterMarkup = \markup \on-the-fly #(markup-when ((page:page-number -1)) (> page:page-number 3)) "This is long!" }
Its first argument is of the same style as the #:properties keyword
arg for
define-markup-command .
That's a nice consistency. I tried it out and the following works too: #(define (onpage proc nmbr) (markup-when ((page:page-number -1)) (proc page:page-number nmbr))) \paper { #(set-paper-size "a7landscape") oddFooterMarkup = \markup \on-the-fly #(onpage > 3) "This is long!" } -Paul https://codereview.appspot.com/74540044/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel