[Top][All Lists]

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

Re: feature-request / doc-actualization (right-margin)

From: Michael Käppler
Subject: Re: feature-request / doc-actualization (right-margin)
Date: Sun, 02 Aug 2009 21:27:01 +0200
User-agent: Thunderbird (X11/20071114)

Hi Maximilian,
1) The code in scm/page.scm is able to test whether left-margin and/or
right-margin was specified by the user in the \paper block (if this
isn't the case, the value is #f). However, the same doesn't seem to be
true for line-width because this variable _always_ has a value (i.e.,
it cannot be undefined like the other two). Thus I cannot check
whether both the left+right margins *and* the line-width were
specified by the user. As Werner pointed out, we should print a
warning in this case and discard one of the values. BTW, how can I
find out which of the values was specified last in the .ly file so
that that's the one taken into account?
I don't think it's possible to determine which variable in a \paper {} block was set first. But in my opinion that's not necessary at all, because it's no problem to discard the same value every time this occurs (maybe, e.g. if left+right margins are set and line-width too, line-width can discarded), if you print a warning. However, I would print a warning just if the values are incompatible to each other what can be checked easily.
When adding the line

   line-width = 10 \cm

to the \paper block it still kinda "works" (the line-width value is
simply discarded so that the margins are as specified). Interestingly,
however, the value of line-width still has an effect on the *spacing*
of the notes. Namely, the notes are spaced as if the line-width were
truly 10cm but then the line gets stretched to account for the margin
values. How can this be avoided? Or is it even a feature rather than a
bug? (I can imagine that some users might want to make use of this to
achieve tighter or wider spacing, although I'm not sure that's a good
This is because line-spacing is done earlier than page-spacing - Lily needs a value for line-width when doing horizontal spacing. Therefore line-width isn't really discarded - but later in page.scm it is overwritten, so you can't see it in the page layout. What I wasn't unable to figure out is at which time line-width is calculated if you don't set it explicitly. And, much more confusing, I don't see any procedures in C++ that actually check the line-width. A "grep -R line-width *" isn't very informative.
Any ideas?


reply via email to

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