lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Doc addition for 11.1.2 "Page formatting"


From: Trevor Bača
Subject: Doc addition for 11.1.2 "Page formatting"
Date: Tue, 3 Apr 2007 07:28:50 -0500

Hi Graham,

Could I suggest the following verbatim change to 11.1.2 "Page formatting"?

There are three small changes:

1. The introduction of a "Commonly tweaked properties" section to
introduce ly/paper-defaults.ly and ly/titling-init.ly.

2. The move of the "Example" section immediately following (instead of
immediately preceding) the information on ly/paper-defaults.ly and
ly/titling-init.ly.

3. The introduction of a second example \paper block with
bottom-centered page numbers.



=== BEGIN (immediately following main attribute listing in 11.1.2) ===

Commonly tweaked properties.

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

\paper {
 #(define bottom-margin (* 2 cm))
}

Examples.

\paper{
 paper-width = 2\cm
 top-margin = 3\cm
 bottom-margin = 3\cm
 ragged-last-bottom = ##t
}

\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 } }
}

This second example centers page numbers at the bottom of every page.

Bugs

The option right-margin is defined but doesn't set the right margin
yet. The value for the right margin has to be defined adjusting the
values of left-margin and line-width.

The default page header puts the page number and the instrument field
from the \header block on a line.

The titles (from the \header{} section) are treated as a system, so
ragged-bottom and ragged-last-bottom will add space between the titles
and the first system of the score.

=== END ===



--
Trevor Bača
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]