lilypond-user
[Top][All Lists]
Advanced

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

Fwd: Strange effect of set-global-staff-size


From: Vaughan McAlley
Subject: Fwd: Strange effect of set-global-staff-size
Date: Sat, 7 Jan 2017 16:43:06 +1100

On 7 January 2017 at 08:12, David Sumbler <address@hidden> wrote:
> I am having a weird problem with the title page of a score, and I am
> hoping somebody can point me in the direction of understanding what
> might be going on.
>
> I am using the same basic layout for score and parts as I have always
> used.  But having organized things rather better than in my earlier
> projects, I now have a top-level file that enables me easily to select
> which scores, parts, midi-files and movements are compiled at each run.
>  It all works very well - except:
>
> This evening I compiled the thing for one last inspection before a
> final printing.  I then realised that I had not set the staff-size for
> the score, and both score and parts were being printed with #(set-
> global-staff-size 20).  I use a staff size of 16 for full scores, so I
> added the appropriate line at the beginning of the file which prints
> the score.  This now begins:
>
> \version "2.19.48"
>
> #(set-global-staff-size 16)
>
> \book {
>   \bookOutputName "../AuroraeScore"
>
>   \paper {
>     two-sided = ##t
>     inner-margin = 15\mm
>     outer-margin = 15\mm
>     binding-offset = 5\mm
>   }
>
> %%% Print score front cover:
>   #(define partName " ")
>   $(if printCover (ly:parser-include-string "\\include "printCover.ily\""))
>
>
> It then goes on to print the Table of Contents page and the scores of
> the various movements, without any problems.
>
> The file "printCover.ily" is simply this:
>
> \bookpart {
>   \markup {
>     \column {
>       \fill-line { \abs-fontsize #24 \bold { "" \partName } }
>       \vspace #14
>       \fill-line { \abs-fontsize #48 \bold \titleStr }
>       \vspace #1.5
>       \fill-line { \abs-fontsize #20 \subtitleStr }
>       \vspace #11
>       \fill-line { \abs-fontsize #20 \composerStr }
>       \vspace #2
>       \fill-line { \abs-fontsize #16 \dateStr }
>     }
>   }
> }
>
> The variables are defined elsewhere, and in this case partName = " "
>
> Now for the weird bit.  Without the #(set-global-staff-size 16)
>  line at the start of "printScore.ily" my cover page prints just fine,
> as it always has.  But with the above line added, the letters are
> squashed together horizontally so that they slightly overlap:
> vertically everything is fine.
>
> What is even more weird, to me, is that this only happens if one of the
> instrumental parts has been printed before the score.  If I comment out
> all the requests for parts in my top-level file, the the score title
> page prints OK.  This means I can work around the problem by printing
> the parts and the score on separate runs.
>
> But can anyone explain what is happening here?  To summarize, the
> problem only arises if
>
> (a) one or more parts are printed before the score.  These are printed
> with #(set-global-staff-size 20)
>
> and
>
> (b) I include the line #(set-global-staff-size 16) for printing the
> score.
>
> The #(set-global-staff-size 16) works fine for printing the score, so
> long as I haven't just printed a part in the same run of Lilypond.
>
> Any help or explanations would be very welcome.
>
> David
>
>
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user

My guess is that so many engravers etc. refer to the global staff size
in who knows what order, that setting it twice could lead to what
programmers know as ‘undefined behaviour’. I use separate files for
scores and parts for this reason. If you really wanted everything in
one file, you could try \magnifyStaff:

http://lilypond.org/doc/v2.19/Documentation/notation/setting-the-staff-size

I believe it works better than layout-set-staff-size...

I don’t have 2.19 so don’t know whether you could sneak \magnifyStaff
into a score’s layout block.

Vaughan



reply via email to

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