On 04/07/2026 09:20, Gabriel Ellsworth wrote:

I would love to get an answer to this question if anyone has it:


On Thu, 25 Jun 2026, Gabriel Ellsworth wrote:

    I’ve a question about paper margins. In
    lilypond/ly/paper-defaults-init.ly at master
    
<https://github.com/lilypond/lilypond/blob/master/ly/paper-defaults-init.ly>,
    I see:
    left-margin-default = 15\mm   % scaled to paper-size
      right-margin-default = 15\mm  % scaled to paper-size

    When I use *letter* (8.5x11) paper, are the *default left and
    right margins* still *exactly* 15 mm?


    (The default margins appearto be exactly 15 mm in my testing, but
    I’m not sure whether LilyPond is doing a small amount of scaling
    away from 15.0000 mm.)

This code prints the values of left-margin-default (always 15mm) and left-margin-default-scaled (varies with the size of the paper). The scaled margins are always an exact number of mm so it looks like rounding to the nearest mm is happening somewhere.

\version "2.26.0"

% #(set-default-paper-size "letter")
% #(set-default-paper-size "a3")
#(set-default-paper-size '(cons (* 8.6 in) (* 11 in)))

lmargin = #(ly:output-def-lookup $defaultpaper 'left-margin-default)
lmargin-scaled = #(ly:output-def-lookup $defaultpaper 'left-margin-default-scaled)
#(ly:message "~s ~s\n" lmargin lmargin-scaled)


--
Timothy Lanfear, Bristol, UK.

Reply via email to