lilypond-user
[Top][All Lists]
Advanced

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

Re: Layout of staff systems and text blocks


From: Thomas Morley
Subject: Re: Layout of staff systems and text blocks
Date: Thu, 31 May 2012 22:14:16 +0200

2012/5/31 Philip Thomas <address@hidden>:

> Hi Harm,
>
> Once again you have been incredibly kind and helpful.
>
> Since writing to the forum yesterday, I had been experimenting with an added
> Dynamics context to act as a kind of "skyhook" for the Background Notes.
> That succeeded in placing the Notes beneath the lyrics OK, but it wrecked
> the horizontal spacing of the previous staff system.
>
> Your solution is much more elegant, and it worked immediately on my score,
> with a couple of adjustments, e.g. to center the footer, including page
> numbers, on pages 2 and 3. (I followed your suggestion as to changing your
> 'third-page' definition separately for each page, which would have been a
> little tedious if there had been 100 pages; sometime I will learn how to
> define the footer for 'every-other-page'!) Thank you so much, anyway!

Glad to hear that it is working for you.

I think there's no need for an 'every-other-page'-definition.
`third-page' was intended to address one specific page. All other
pages are not touched, regarding their output.
Nevertheless, I generalized (and renamed) it:
`which-page' can affect every specified page (of course it needs an
additional argument for the desired page-number). Syntax: e.g.
\on-the-fly #(which-page 3)
Multiple choices are possible.

I wasn't aware that you wanted the page-numbers in the footers. So I
simply added them.

>
> Two problems remain:
>
> First, the two systems on the last page are now jammed together too close,
> although visually there seems to be plenty of space available. Can you
> suggest what \paper setting I should look at to fix that? Vertical spacing
> issues are not the easiest to resolve, I have found. There are scads of
> properties and it isn't altogether clear how they all work, individually and
> in combination.

In my example-setup I used \vspace-commands several times. Did you
remove them or reduce their amount? I don't have the problem that the
systems are too close.
However, I added a system-system-spacing in \paper. You may want to
play around with the values.

>
> Second, can you suggest how to add a "segue" indication below the bass line
> lyrics? It would be placed at the end of, and below, the second system on
> page 3 -- i.e. above the Background Notes and to the right. It would seem to
> be more logical if it was anchored in the music or lyrics rather than as
> part of the footer.

Why not simply use a RehearsalMark? I defined `segue' separatly and
used it in `pagebreaks'

Some more alterations:
(1)
I added the `not-last-page'-definition.
(2)
There's no need to introduce new header-variables for
`backgroundNotes' and `pronunciationGuide'.
I deleted them and changed the footer-settings accordingly.
(3)
A \layout is added with
\override NonMusicalPaperColumn #'page-break-permission = ##f
to make sure that pageBreak occurs only at the specified points.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version "2.15.39"

#(define ((which-page nmbr) layout props arg)
  (if (= (chain-assoc-get 'page:page-number props 0) nmbr)
    (interpret-markup layout props arg)
    empty-stencil))

#(define (not-last-page layout props arg)
  (if (and (chain-assoc-get 'page:is-bookpart-last-page props #f)
           (chain-assoc-get 'page:is-last-bookpart props #f))
    empty-stencil
    (interpret-markup layout props arg)))

textPlusTranslation =
\markup \column {
        " " " " " "
        "Some text and translation"
        "Some text and translation"
        "Some text and translation"
        "Some text and translation"
        "Some text and translation"
        " " " " " "
}

backgroundNotes =
\markup \column {
        \vspace #1
        "Some Background Notes"
        "Some Background Notes"
        "Some Background Notes"
        "Some Background Notes"
        "Some Background Notes"
        "Some Background Notes"
        \vspace #1
}

pronunciationGuide =
\markup \column {
        \vspace #1
        "pronunciationGuide"
        "pronunciationGuide"
        "pronunciationGuide"
        "pronunciationGuide"
        "pronunciationGuide"
        "pronunciationGuide"
        \vspace #4
}

\header {
        title = "TITLE"
        subtitle = \textPlusTranslation
}

\paper {
     system-system-spacing =
         #'((basic-distance . 12)
            (minimum-distance . 6)
            (padding . 1)
            (stretchability . 12))
     ragged-bottom = ##f
     ragged-last-bottom = ##f
     ragged-last = ##f
     oddHeaderMarkup = ##f
     evenHeaderMarkup = ##f
     oddFooterMarkup = \markup \fill-line {
             \center-column {
                 \on-the-fly #(which-page 3)
                        \backgroundNotes
                 \on-the-fly #last-page
                        \pronunciationGuide
                 \on-the-fly #last-page
                        \fromproperty #'header:tagline
                 \on-the-fly #not-last-page
                 \on-the-fly #not-first-page    
                        \fromproperty #'page:page-number-string
             }
     }
     evenFooterMarkup = \markup \fill-line {
             \center-column {
                 \on-the-fly #(which-page 3)
                        \backgroundNotes
                 \on-the-fly #last-page
                        \pronunciationGuide
                 \on-the-fly #last-page
                        \fromproperty #'header:tagline
                 \on-the-fly #not-last-page
                 \on-the-fly #not-first-page    
                        \fromproperty #'page:page-number-string
             }
     }
}

segue = {
        \once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #f)
        \once \override Score.RehearsalMark #'direction = #DOWN
        \once \override Score.RehearsalMark #'self-alignment-X = #RIGHT
        \mark \markup \italic "segue"
}

pagebreaks = {
        s1*2 \pageBreak
        s1*3 \pageBreak
        s1*2
        \segue
        \pageBreak
}

mus =
\relative c' {
        \repeat unfold 9 { c1 \break }
        \bar "|."
}

lyr =
\lyricmode {
        \repeat unfold 8 { la -- }
        la
}


\score {
        \new ChoirStaff <<
        \new Staff \new Voice = "S" { << \clef soprano \pagebreaks \mus >> }
          \new Lyrics \lyricsto "S" \lyr

        \new Staff \new Voice = "A" { \clef alto \mus }
          \new Lyrics \lyricsto "A" \lyr

        \new Staff \new Voice = "T" { \clef tenor \mus }
          \new Lyrics \lyricsto "T" \lyr

        \new Staff \new Voice = "B" { \clef bass \mus }
          \new Lyrics \lyricsto "B" \lyr
        >>
        \layout {
                \context {
                        \Score
                        %\override NonMusicalPaperColumn 
#'line-break-permission = ##f
                        \override NonMusicalPaperColumn #'page-break-permission 
= ##f
            }
        }
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

HTH,
  Harm



reply via email to

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