BUG OR FEATURE?: \markup { "Piano " } vs. \markup { "Piano" " " " " }

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

BUG OR FEATURE?: \markup { "Piano " } vs. \markup { "Piano" " " " " }

Heikki Junes
I tried to make a new context with ChordNames in between Piano staves,
and found a strange (?) behaviour with ending spaces in the instrument
names:

\version "2.7.5"
melody = \relative c' { \clef "G" c2 b c1 \bar "|." }
harmonies = \chordmode { c'2 g c4 }
accompaniment = \relative c { \clef "F" c2 g c1 }
\score {
  \context PianoStaff <<
    \context Voice = one { \melody }
    \context ChordNames = two { \harmonies }
    \context Voice = three { \accompaniment }
  >>
  \layout {
    \context{
      \PianoStaff
      \override VerticalAlignment #'forced-distance = #7
      % does not work: instrument = \markup { "Piano  " }
      instrument = \markup { "Piano" " " " " " " }
      \accepts "ChordNames"
    }
  }
}

In this example, \markup { "Piano  " } was reduced to \markup { "Piano"
}, and only \markup { "Piano" " " " " } gave the needed extra space. Is
this a bug of a feature the ending spaces are removed?

This behaviour is a bit unobvious, therefore the bug mentioned in
http://lilypond.org/doc/v2.7/Documentation/user/out-www/lilypond/Instrument-names.html#Instrument-names
did not give an adequate advice for adding the extra space needed in the
presence of staff slurs.

Heikki


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: BUG OR FEATURE?: \markup { "Piano " } vs. \markup { "Piano" " " " " }

Graham Percival-2

On 15-Aug-05, at 2:40 AM, Heikki Junes wrote:

> In this example, \markup { "Piano  " } was reduced to \markup {
> "Piano" }, and only \markup { "Piano" " " " " } gave the needed extra
> space. Is this a bug of a feature the ending spaces are removed?

It's a feature (in terms of the fact that it's deliberate).  Lilypond
ignores
whitespaces, so " " = "  " = "   " = "        " = "





  "

I guess that if you have " " " " " ", it forces lilypond to output
three blank spaces.

Cheers,
- Graham



_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: BUG OR FEATURE?: \markup { "Piano " } vs. \markup { "Piano" " " " " }

Mats Bengtsson-6
In reply to this post by Heikki Junes
I have just changed the text in the bug description in the manual to say:

When you put a name on a grand staff or piano staff, the width of the
brace is not taken into account. The following property setting can be
used to move the instrument names to the left, in such situations.
@example
\override Score.InstrumentName #'space-alist = #'((left-edge extra-space
. 2.0))
@end example

On the other hand, why not increase the default spacing from 1.0 to 2.0
to avoid these collisions. I don't think that it looks too wide even
when you don't have any starting brace/bracket. Also, I think there
is a sufficiently large number of pieces for piano + one or more
instruments so the problem appears often enough now.

    /Mats

Heikki Junes wrote:

> I tried to make a new context with ChordNames in between Piano staves,
> and found a strange (?) behaviour with ending spaces in the instrument
> names:
>
> \version "2.7.5"
> melody = \relative c' { \clef "G" c2 b c1 \bar "|." }
> harmonies = \chordmode { c'2 g c4 }
> accompaniment = \relative c { \clef "F" c2 g c1 }
> \score {
>  \context PianoStaff <<
>    \context Voice = one { \melody }
>    \context ChordNames = two { \harmonies }
>    \context Voice = three { \accompaniment }
>  >>
>  \layout {
>    \context{
>      \PianoStaff
>      \override VerticalAlignment #'forced-distance = #7
>      % does not work: instrument = \markup { "Piano  " }
>      instrument = \markup { "Piano" " " " " " " }
>      \accepts "ChordNames"
>    }
>  }
> }
>
> In this example, \markup { "Piano  " } was reduced to \markup { "Piano"
> }, and only \markup { "Piano" " " " " } gave the needed extra space. Is
> this a bug of a feature the ending spaces are removed?
>
> This behaviour is a bit unobvious, therefore the bug mentioned in
> http://lilypond.org/doc/v2.7/Documentation/user/out-www/lilypond/Instrument-names.html#Instrument-names 
>
> did not give an adequate advice for adding the extra space needed in the
> presence of staff slurs.
>
> Heikki
>
>
> _______________________________________________
> lilypond-devel mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/lilypond-devel

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
         Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel