From: Graham Percival Date: Tue, 3 Apr 2007 23:12:39 +0000 (-0700) Subject: Addition from mailist. X-Git-Tag: release/2.11.22-1~7 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4c9d1ccfc09b5fd049483315e4ec33db2c5a38b6;p=lilypond.git Addition from mailist. --- diff --git a/Documentation/user/spacing.itely b/Documentation/user/spacing.itely index 814525184c..708e8d0981 100644 --- a/Documentation/user/spacing.itely +++ b/Documentation/user/spacing.itely @@ -286,6 +286,30 @@ result in the first page number remaining as is or being increased by one. @end table @end quotation + +@commonprop + +The header and footer are created by the functions make-footer and +make-header, defined in \paper. The default implementations are in +ly/paper-defaults.ly and ly/titling-init.ly. + +The page layout itself is done by two functions in the \paper block, +page-music-height and page-make-stencil. The former tells the +line-breaking algorithm how much space can be spent on a page, the +latter creates the actual page given the system to put on it. + +You can define paper block values in Scheme. In that case mm, in, pt, +and cm are variables defined in paper-defaults.ly with values in +millimeters. That is why the value 2 cm must be multiplied in the +example + +@example +\paper @{ + #(define bottom-margin (* 2 cm)) +@} +@end example + + Example: @example @@ -297,6 +321,23 @@ Example: @} @end example +This second example centers page numbers at the bottom of every page. + +@example +\paper @{ + print-page-number = ##t + print-first-page-number = ##t + oddHeaderMarkup = \markup \fill-line @{ " " @} + evenHeaderMarkup = \markup \fill-line @{ " " @} + oddFooterMarkup = \markup @{ \fill-line @{ + \bold \fontsize #3 \on-the-fly #print-page-number-check-first + \fromproperty #'page:page-number-string @} @} + evenFooterMarkup = \markup @{ \fill-line @{ + \bold \fontsize #3 \on-the-fly #print-page-number-check-first + \fromproperty #'page:page-number-string @} @} +@} +@end example + You can also define these values in Scheme. In that case @code{mm}, @code{in}, @code{pt}, and @code{cm} are variables defined in @file{paper-defaults.ly} with values in millimeters. That is why the