LilyPond 記譜法リファレンス: 4.1.2 Paper size and automatic scaling

### 4.1.2 Paper size and automatic scaling

#### Setting paper size

Two functions are available for changing the paper size: `set-default-paper-size` and `set-paper-size`. `set-default-paper-size` must be placed in the toplevel scope, and `set-paper-size` must be placed in a `\paper` block:

>     #(set-default-paper-size "a4")

>     \paper {
>       #(set-paper-size "a4")
>     }

In the toplevel scope, the `set-default-paper-size` function can safely be called anywhere before the first `\paper` block. Within a `\paper` block, the safest place to call `set-paper-size` is at the top, above the list of variable declarations. The reasons for this are discussed in Automatic scaling to paper size.

`set-default-paper-size` sets the size of all pages, whereas `set-paper-size` only sets the size of the pages that the `\paper` block applies to. For example, if the `\paper` block is at the top of the file, then it will apply the paper size to all pages. If the `\paper` block is inside a `\book`, then the paper size will only apply to that book.

Common paper sizes are available, including `a4`, `letter`, `legal`, and `11x17` (also known as tabloid). Many more paper sizes are supported by default. For details, see ‘`scm/paper.scm`’, and search for the definition of `paper-alist`.

Note: The default paper size is `a4`.

Extra sizes may be added by editing the definition of `paper-alist` in the initialization file ‘`scm/paper.scm`’, however they will be overridden on a subsequent install.

If the symbol `'landscape` is supplied as an argument to `set-default-paper-size`, pages will be rotated by 90 degrees, and wider line widths will be set accordingly.

>     #(set-default-paper-size "a6" 'landscape)

#### 参照

Notation Reference: Automatic scaling to paper size.

Installed Files: ‘`scm/paper.scm`’.

#### Automatic scaling to paper size

If the paper size is changed with one of the scheme functions (`set-default-paper-size` or `set-paper-size`), the values of several `\paper` variables are automatically scaled to the new size. To bypass the automatic scaling for a particular variable, set the variable after setting the paper size. Note that the automatic scaling is not triggered by setting the `paper-height` or `paper-width` variables, even though `paper-width` can influence other values (this is separate from scaling and is discussed below). The `set-default-paper-size` and `set-paper-size` functions are described in Setting paper size.

The vertical dimensions affected by automatic scaling are `top-margin` and `bottom-margin` (see Fixed vertical spacing `\paper` variables). The horizontal dimensions affected by automatic scaling are `left-margin`, `right-margin`, `inner-margin`, `outer-margin`, `binding-offset`, `indent`, and `short-indent` (see Horizontal spacing `\paper` variables).

The default values for these dimensions are set in ‘`ly/paper-defaults-init.ly`’, using internal variables named `top-margin-default`, `bottom-margin-default`, etc. These are the values that result at the default paper size `a4`. For reference, with `a4` paper the `paper-height` is `297\mm` and the `paper-width` is `210\mm`.

#### 参照

Notation Reference: Fixed vertical spacing `\paper` variables, Horizontal spacing `\paper` variables.

Installed Files: ‘`ly/paper-defaults-init.ly`’, ‘`scm/paper.scm`’.

他の言語: English, deutsch, español, français

#### LilyPond — 記譜法リファレンス