[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: markup after score, keep on the same page
From: |
Thomas Morley |
Subject: |
Re: markup after score, keep on the same page |
Date: |
Tue, 31 Jan 2012 11:39:27 +0100 |
Hi Nils,
2012/1/31 Nils <address@hidden>:
> Hello,
>
> I plan to use a markup for subtext ("melody by xy, modified in 1865 in the
> version of publisher z" etc.) , after score. This will be either used in a
> compilation of movements or as part of a lilypond-book/latex file.
>
> \score {
> ...
> }
>
> \markuplines {
> \wordwrap-lines {
> ...
> }
> }
>
>
> I want to make sure that the subtext is never on the next page alone, there
> should be always at least one staff directly above it.
> Does Lilypond take care of that automatically or do I have to enforce it
> somehow?
>
> Nils
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
you could use \no PageBreak.
Sometime ago I created the following snippet (containing two
possibilities) for the german forum. Perhaps you find it useful.
\version "2.14.2"
% http://www.lilypondforum.de/index.php?topic=605.msg3313#msg3313
#(define ((underBarLine markup) grob)
(ly:stencil-combine-at-edge (ly:bar-line::print grob)
Y DOWN (grob-interpret-markup grob markup) 0 0))
schlussMarkupOne = \markup \with-dimensions #'(0 . 0) #'(-10 . 5)
\right-align \tiny
\fill-line {\null "poet1 (16xx- 17xx)" "composer1
(1685-1750)" \null}
lastLine =
#(define-music-function (parse location str-one str-two) (string? string?)
#{
#(define ((underBarLine markup) grob)
(ly:stencil-combine-at-edge (ly:bar-line::print grob)
Y DOWN (grob-interpret-markup grob markup) 0 0))
#(define schlussMarkup
(markup #:with-dimensions '(0 . 0) '(-10 . 5)
#:right-align
#:tiny
#:fill-line ("" $str-one $str-two "")
))
\once \override Staff.BarLine #'stencil = #(underBarLine schlussMarkup)
#})
%------------------- Test ------------------------------------------------------
\paper {
ragged-right = ##f
print-all-headers = ##t
}
one =
\relative c'' {
a1 \break
b
\once \override Staff.BarLine #'stencil = #(underBarLine schlussMarkupOne)
\bar "|."
}
two =
\relative c'' {
c1 \break
d
\lastLine #"poet2 (??- !!!)" #"composer2 (bla-blub)"
\bar "|."
}
\score {
\new Staff = "one"{
<<
\one
>>
}
\header {
title = "title 1"
subtitle = "subtitle1"
subsubtitle = "subsubtitle1"
composer = "composer1"
arranger = "arranger1"
poet = "poet1"
}
\layout { }
}
\score {
\new Staff = "two" {
<<
\two
>>
}
\header {
title = "title 2"
subtitle = "subtitle2"
subsubtitle = "subsubtitle2"
composer = "composer2"
arranger = "arranger2"
poet = "poet2"
}
\layout { }
}
HTH,
Harm