lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme in \layout to produce relative dimensions


From: Nicolas Sceaux
Subject: Re: scheme in \layout to produce relative dimensions
Date: Tue, 16 May 2006 20:32:21 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Graham Percival <address@hidden> writes:

> Here's what I unsuccessfully tried,
>
> \score{
>    \relative c'' {
>      \repeat unfold 16 {a4 b c d}
>    }
>    \layout{
> %    left-margin = #(- 30 mm)
>      #(define line-width (- 30 mm))
>    }
> }

I don't know what exactly you're trying to do, but maybe this example may
help you:

\paper {
  left-margin = 15\mm
  right-margin = 15\mm
  #(define line-width (- paper-width (* 30 mm)))
}

This resizes the margins (15mm left and right), and then set accordingly
the line width.

Indeed, the paper width being set when the paper size is defined (using
set-default-paper-size for instance), the line width can be computed as
follow:
  line-width = paper-width - left-margin - right-margin
that is, in scheme:
  #(define line-width (- paper-width left-margin right-margin))

nicolas





reply via email to

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