2016-01-14 21:00 GMT+01:00 Mike Solomon <m...@mikesolomon.org>: > Hey all, > > Is it possible to have different margins for the footer and for the music in > LilyPond? I’d like to place page numbers to the left and right of the > music’s margin but they seem to be flush with the music’s margin no matter > what markup hacking I try. > > Cheers, > MS > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user
After an idea by Torsten Hämmerle http://www.lilypondforum.de/index.php?topic=1393.msg7673#msg7673 \version "2.19.35" #(set-default-paper-size "a6") #(define page-number-offsets '( (even . (2 . 0)) (odd . (-2 . 0)) )) #(define-markup-command (place-folio layout props folio) (markup?) (let* ((pageno (chain-assoc-get 'page:page-number props)) (even-odd-page (if (even? pageno) 'even 'odd)) (m (interpret-markup layout props folio)) (x-ext (ly:stencil-extent m X)) (y-ext (ly:stencil-extent m Y))) (interpret-markup layout props (markup #:with-dimensions x-ext y-ext #:line (#:translate (assoc-get even-odd-page page-number-offsets) folio) )))) \paper { indent = 0 first-page-number = 1 ragged-right = ##f oddHeaderMarkup = \markup %\on-the-fly #not-first-page \fill-line { \place-folio \fromproperty #'page:page-number-string \null } evenHeaderMarkup = \markup \fill-line { \null \place-folio \fromproperty #'page:page-number-string } } { \repeat unfold 10 { s1 \pageBreak } } HTH, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user