diff options
author | Thomas Morley <thomasmorley65@googlemail.com> | 2012-06-28 12:02:40 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2012-07-04 14:57:40 +0200 |
commit | 7b999268d43ff84fa3ef42b46f0c6f72ec0bb9c6 (patch) | |
tree | 4aa5f18889994556118d4be42018ccac810cd404 /input | |
parent | 733f5e6a27700483ee3e1b1ea791a86f30f708ce (diff) |
Issue 2626: add on-page for usage in \on-the-fly
For adding a markup to a footer/header of a specified page,
you can now use (on-page <page-number>) as a specification in \on-the-fly.
Signed-off-by: David Kastrup <dak@gnu.org>
Diffstat (limited to 'input')
-rw-r--r-- | input/regression/page-headers-and-footers.ly | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/input/regression/page-headers-and-footers.ly b/input/regression/page-headers-and-footers.ly new file mode 100644 index 0000000000..ea3c5b8b0b --- /dev/null +++ b/input/regression/page-headers-and-footers.ly @@ -0,0 +1,45 @@ +\version "2.15.41" + +\header { + + texidoc = "Page-headers and -footers. All headers and footers + should be printed on their specified page. " + +} + +\paper { + ragged-last-bottom = ##f + + oddHeaderMarkup = \markup { + \override #'(baseline-skip . 1) + \center-column { + \box \fill-line { \teeny " " " " } + \on-the-fly #first-page "first-page-header-text" + \on-the-fly #not-first-page \fromproperty #'page:page-number-string + \on-the-fly #(on-page 2) "page-2-header-text" + \on-the-fly #last-page "last-page-header-text" + } + } + + evenHeaderMarkup = \oddHeaderMarkup + + oddFooterMarkup = \markup \fill-line { + \override #'(baseline-skip . 0.5) + \center-column { + \on-the-fly #first-page "first-page-footer-text" + \on-the-fly #last-page "last-page-footer-text" + \on-the-fly #(on-page 2) "page-2-footer-text" + \box \fill-line { \teeny " " " " } + } + } +} + +#(set-default-paper-size "a6" 'portrait) + +\book { + \score { + \new Staff \relative c' { + \repeat unfold 18 { a b c d \break } + } + } +} |