Thanks. Yes, this looks like it will work for my needs.

On Fri, May 5, 2023 at 2:36 PM Jean Abou Samra <j...@abou-samra.fr> wrote:

> Le vendredi 05 mai 2023 à 11:02 -0700, Eric Benson a écrit :
>
> Would there be a way to conditionally include a \pageBreak at top level?
> E.g. \if #(some-predicate) { \pageBreak }
>
> Try
>
> $(if (some-predicate) #{ \pageBreak #})
>
> Generally speaking, LilyPond doesn't reinvent the wheel through a
> full-fledged programming language of its own, but just reuses its host
> language, Scheme.
>
> Reading these pages might help:
>
> https://extending-lilypond.gitlab.io/en/scheme/conditions.html#if-syntax
>
>
> https://extending-lilypond.gitlab.io/en/extending/intro.html#inserting-scheme-inside-lilypond
>
> https://extending-lilypond.gitlab.io/en/extending/lily-and-scheme.html
>

Reply via email to