On Sun, Jan 20, 2013 at 1:53 PM, Marc Hohl <m...@hohlart.de> wrote:
> For one specific page I have to remove the footer completely.
> I set
>
> \label #'emptypage

Can the page without a footer be in a book-part of its own? That would
be too simple so I'm assuming not.

Below is adapted from some help I got a while back to move the hymn
number to the outside of the page depending if the page is even or
odd. In this case it blanks the footer when the current page is the
same as the page number for the label (you can't reuse the same label
on multiple pages).

\version "2.17.10"

#(define-markup-command (empty-with-label layout props sym markup)
(symbol? markup?)
  (let* ((stencil (interpret-markup layout props markup))
         (x-ext (ly:stencil-extent stencil X))
         (y-ext (ly:stencil-extent stencil Y)))
    (ly:make-stencil
     `(delay-stencil-evaluation
       ,(delay (ly:stencil-expr
                 (let* ((curr-page (chain-assoc-get 'page:page-number props -1))
                        (table (ly:output-def-lookup layout 'label-page-table))
                        (page-number (if (list? table)
                                         (assoc-get sym table)
                                         #f)))
                   (if (= page-number curr-page)
                     empty-stencil
                     (interpret-markup layout props markup))))))
     x-ext
     y-ext)))

\paper
{
  oddFooterMarkup = \markup {\empty-with-label #'emptypage \fill-line
{"footer"} }
  evenFooterMarkup = #oddFooterMarkup
}

\bookpart
{
  \markup "A"
  \pageBreak

  \markup "B"
  \pageBreak

  \label #'emptypage
  \markup "C"
  \pageBreak

  \markup "D"
  \pageBreak
}

-----Jay

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

Reply via email to