lilypond-user
[Top][All Lists]
Advanced

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

Re: Spacing issue after Mark and TextScript


From: David Sumbler
Subject: Re: Spacing issue after Mark and TextScript
Date: Sun, 25 Nov 2018 12:30:03 +0000

-----Original Message-----
From: Thomas Morley <address@hidden>
To: David Sumbler <address@hidden>
CC: address@hidden, lilypond-user <address@hidden>
Subject: Re: Spacing issue after Mark and TextScript
Date: Sat, 24 Nov 2018 22:28:06 +0100

Am Fr., 23. Nov. 2018 um 15:28 Uhr schrieb David Sumbler <
address@hidden>:
> 
> -----Original Message-----
> From: David Sumbler <address@hidden>
> Reply
> -To: address@hidden
> To: address@hidden
> Subject: Spacing issue after Mark and TextScript
> Date: Wed, 21 Nov 2018 12:24:29 +0000
> 
> %%%%%%%%%%%%%%%%%%%
> \version "2.19.81"
> 
> #(set-global-staff-size 12)
> 
> indent = #0
> 
> { \textLengthOn
>   \time 5/4
>   r2 r4.
>   \override Score.RehearsalMark.self-alignment-X = #-1
>   \override Score.RehearsalMark.font-size = #5
>   \mark \markup {"After the thirty-third encore, the Emperor arose."}
>   \hide TextScript
>   r8\fermata_"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm"
>   r4 |
> %%%  \noBreak
>   R4*5 | R4*5 | R4*5 |
> }
> %%%%%%%%%%%%%%%%%%%
> 
> When the above is compiled, the spacing for notes/rests after the
> Mark
> and TextScript is increased.  This becomes even more obvious if
> \noBreak is uncommented: the final crotchet rest of the first bar and
> the whole bar rest of the second now take up so much horizontal space
> that the line runs outside of the right-hand margin, as is shown in
> the
> attached image.  Meanwhile the rests at the start of the first bar
> are
> squashed together to make room for the unnecessary empty spaces later
> in the line.  Things are restored to normal after a line break.
> 
> If I remove either the RehearsalMark or the TextScript, the problem
> disappears.  The purpose of the textscript is to prevent the crotchet
> rest appearing before the "Mark" is finished.
> 
> I have used the same kind of structure in numerous other places in
> this
> piece without problems, and despite nearly a day of experimentation I
> can't see why this case behaves differently.  (There are reasons for
> presenting these texts as Marks rather than Text attached to a rest,
> but they are not relevant to the problem.)
> 
> Any suggestions?  Is there perhaps a way of resetting the spacing
> parameters to something sensible?
> 
> David
> 
> -----Original Message-----
> From: Pedro Pessoa <address@hidden>
> To: address@hidden
> Subject: Re: Spacing issue after Mark and TextScript
> Date: Wed, 21 Nov 2018 09:26:42 -0700 (MST)
> 
> Hey David. Not sure if I got how you want it to be, but - with the
> \nobreak
> uncommented) - if you add tree more m's to the TextScript, it
> produces
> something which looks right. Don't know why.
> 
> Pessoa
> 
> mailing_Spacing_issue_after_Mark_and_TextScript.png
> <
> 
http://lilypond.1069038.n5.nabble.com/file/t5699/mailing_Spacing_issue_after_Mark_and_TextScript.png>
> ;
> 
> --
> 
> 
> True - it looks as if the spacing text (the "mmmm"-s) needs to be as
> far as possible exactly the same length as the TextScript.
> 
> But add even one more "m" and the right-hand end of the staff is
> again
> noticeably beyond the right margin.
> 
> And even with the "correct" number of "m"s, so that the end of the
> line
> appears in (roughly?) the right place, the rests at the beginning of
> the line are ridiculously compressed together.  The space give to the
> crotchet rest at the end of the bar is far greater than that allowed
> for the dotted crotchet earlier in the same bar.
> 
> Does anyone have any idea what is going on here?
> 
> David

I noticed with version 2.12.3 the output is as desired.

Then I identified the first commit which changes the behaviour. First
bad commit is:

commit 53db923e715126eb9463220526b4838fbfd3dad4
Author: Andrew Hawryluk <address@hidden>
Date:   Sat Jan 15 13:42:03 2011 -0700

    Change keep-inside-line defaults to true.

    As discussed in Issue #1470, the default should be changed so that
    good layout with a slight performance hit is the default.

https://sourceforge.net/p/testlilyissues/issues/1470/
https://codereview.appspot.com/4243041/
Which is LilyPond-version 2.13.52


Tbh, I never noticed bad behaviour caused by this patch before.
I suspect something rotten is present elsewhere, though I've no clue
what it might be or where to look...


Nevertheless, you could revert the settings done by this patch globally
with:

\layout {
  \context {
    \Score
    \override NonMusicalPaperColumn.keep-inside-line = #'()
    \override PaperColumn.keep-inside-line = #'()
  }
}

This may have some unwanted effects, though.
Less invasive would be:

#(set-global-staff-size 12)

indent = #0

{ \textLengthOn
  \time 5/4
  r2 r4.

  \overrideProperty Score.NonMusicalPaperColumn.keep-inside-line #'()
  \overrideProperty Score.PaperColumn.keep-inside-line #'()
  \override Score.RehearsalMark.self-alignment-X = #-1
  \override Score.RehearsalMark.font-size = #4
  \mark \markup {"After the thirty-third encore, the Emperor arose."}
  \hide TextScript
  r8\fermata_"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm"
  r4 |
  \noBreak
  R4*5 | R4*5 | R4*5 |
}

HTH,
  Harm

*****************

Once again, I am overwhelmed by the time and effort you must have given
to this, and by the depth of your understanding of the inner workings
of Lilypond.  Thank you so much.

I have used your "less invasive" version, and with this I can get the
result I wanted.  I actually have the line finishing with the word
"tacet" in a white-out box, in such a way that the stave appears to
finish early followed by "tacet" ending at the margin.  I also did this
in an earlier movement, but without any obvious spacing problems
showing up.

The parameters NonMusicalPaperColumn and suchlike have long been a
mystery to me.  If it can be done reasonably succinctly, could you
perhaps explain what NonMusicalPaperColumn.keep-inside-line #'() and
PaperColumn.keep-inside-line #'() actually do?

David




reply via email to

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