[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: markup after score, keep on the same page
From:       Thomas Morley <thomasmorley65 () googlemail ! com>
Date:       2012-01-31 10:39:27
Message-ID: CABsfGyWi7nx1KHHZJFWkE+wkkgMZdxrviYvo+ymbaub3TXw+Hg () mail ! gmail ! com
[Download RAW message or body]

Hi Nils,

2012/1/31 Nils <list@nilsgey.de>:
> 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
> lilypond-user@gnu.org
> 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic