I'm putting in some text before a score and I don't want a page break
between them. I know how to do this manually. Here's an example:

===================================================
\version "2.19.15"

\book
{
  \markup "fill some space"
  \score
  {
    \new Staff \relative c'
    {
      \repeat unfold 13 {c1 | \break}
    }
    \layout
    {
      ragged-right = ##t
    }
  }
  \markup "Keep with next"

  \noPageBreak %%%%%%% <----  What I want to do programatically.

  \score
  {
    \new Staff \relative c'
    {
      c1 |
    }
    \layout
    {
      ragged-right = ##t
    }
  }
}
===================================================


I want to do this programatically. Something like this:
===================================================
\version "2.19.15"

makeStuff =
#(define-void-function (parser loc) ()
  (add-text parser #{\markup "fill some space" #})
  (add-score parser #{
    \score
    {
      \new Staff \relative c'
      {
        \repeat unfold 13 {c1 | \break}
      }
      \layout
      {
        ragged-right = ##t
      }
    }
  #})
  (add-text parser #{\markup "Keep with next"#})
  ; This doesn't work:
  (add-score parser #{ \noPageBreak #})
  (add-score parser #{
    \score
    {
      \new Staff \relative c'
      {
        c1 |
      }
      \layout
      {
        ragged-right = ##t
      }
    }
  #}))

\makeStuff
===================================================

Unfortunately I can't get the \noPageBreak to work here. Any ideas on
the difference? Thanks.

-----Jay

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to