Jump to content

Using ad hoc paper sizes: Difference between revisions

From LilyPond wiki
No edit summary
m New category
 
Line 25: Line 25:
</lilypond>
</lilypond>


[[Category:Paper and layout]][[Category:Snippet]]
[[Category:Paper and layout]]
[[Category:Snippet]]

Latest revision as of 23:29, 21 November 2025

This snippet shows how to define custom paper sizes.

\version "2.24"

%% http://lsr.di.unimi.it/LSR/Item?id=762

% define the new format with a unique name and width and height
#(set! paper-alist (cons '("square" . (cons (* 10 cm) (* 10 cm))) paper-alist))

\paper {
% utilize the new format
  #(set-paper-size "square" 'landscape)

  oddHeaderMarkup = \markup {
    \fill-line { "***" "***" }
  }
  oddFooterMarkup = \markup {
    \fill-line { "***" "***" }
  }
}
#(set-global-staff-size 16)

\relative c'' {
  bes a c b
}