bug-lilypond
[Top][All Lists]
Advanced

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

Re: \set Staff.instrument=\markup { \center-align { "Instrument." }} sti


From: Han-Wen Nienhuys
Subject: Re: \set Staff.instrument=\markup { \center-align { "Instrument." }} still has alignment problems.
Date: Mon, 20 Mar 2006 15:45:32 +0100
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

Trent Johnston wrote:
Hi All,

 Using \mark { \center-align etc... still doesn't format the instrument
names correctly. As can be seen in the attached image (V2-7-39instrument)
the names of staves are all over the place.

The stable 2-6-5 windows the names are set out correctly (see
V2-6-5instrument).

Also using \markup { \column { "Violino I." \line { "Oboe I." }}} to get an
instrument names on two lines the first instrument is right-aligned while
the second instrument is left-aligned.

A good fix is too much work right now, but here is a usable solution.

Graham , can you work this into the docs? An example is in input/test/instrument-name-align.ly

#(define-markup-command (hcenter-in layout props length arg)
  (number? markup?)
  "Center @var{arg} horizontally within a box of extending
@var{length}/2 to the left and right."

  (interpret-markup layout props
                    (make-pad-to-box-markup
                     (cons (/ length -2) (/ length 2))
                     '(0 . 0)
                     (make-hcenter-markup arg))))


\new StaffGroup \relative
<<
  \set Staff.instrument
    = \markup { \hcenter-in #10 "blabla" }
    c1 c1
  }
  \new Staff {
    \set Staff.instrument
    = \markup { \hcenter-in #10 "blo" }
    c1 c1
  }

>>


--

Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com





reply via email to

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