lilypond-common-includes/legacy-lilypond-compatibility.ly

28 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2023-07-22 22:07:57 +02:00
% this is to be compatible to older lilypond versions
\version "2.18.0"
#(define (on-first-page layout props)
"Whether the markup is printed on the first page of the book."
(= (chain-assoc-get 'page:page-number props -1)
(book-first-page layout props)))
#(define-markup-command (if layout props condition? argument)
(procedure? markup?)
#:category conditionals
(if (condition? layout props)
(interpret-markup layout props argument)
empty-stencil))
#(define (on-first-page-of-part layout props)
"Whether the markup is printed on the first page of the book part."
(= (chain-assoc-get 'page:page-number props -1)
(ly:output-def-lookup layout 'first-page-number)))
#(define (should-print-page-number layout props)
"Whether the page number should be printed on this page. This depends
on the settings @code{print-@/page-@/numbers} and
@code{print-@/first-@/page-@/number} of the @code{\\paper} block."
(and (eq? #t (ly:output-def-lookup layout 'print-page-number))
(or (not (on-first-page layout props))
(eq? #t (ly:output-def-lookup layout 'print-first-page-number)))))