[Top][All Lists]

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

Re: Add on-page-greater-than, -less-than (on-the-fly) (issue 74540044)

From: paulwmorris
Subject: Re: Add on-page-greater-than, -less-than (on-the-fly) (issue 74540044)
Date: Sat, 10 Jun 2017 12:36:30 -0700

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
'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.
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 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


reply via email to

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