lilypond-user
[Top][All Lists]
Advanced

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

Re: horizontal center-align of systems?


From: Ole Schmidt
Subject: Re: horizontal center-align of systems?
Date: Tue, 6 Jul 2010 23:26:21 +0200

Thanks, looks like  only some slight modifications are needed, see code, but I can't solve it myself- that scheme part is all Greek to me...

ole

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(define-markup-command (ignoreInstrumentName layout props score) (markup?)
  (let* (
         ;; get stencil from markup
         (stencil (interpret-markup layout props score))
         ;; get dimensions of stencil in X and Y axes
         (x-extent (ly:stencil-extent stencil X))
         (y-extent (ly:stencil-extent stencil Y)))

    ;; reset left part of x-extent so it's the same as
    ;; a score markup without an instrument name
    (set-car! x-extent -0.2)
    ;; return a copy of original stencil with altered bounding box
    (ly:make-stencil (ly:stencil-expr stencil) x-extent y-extent)))

\markup {
  \fill-line {
    \ignoreInstrumentName
    \score {
      \new Staff \with { instrumentName = "Instrument Name" } { a4 g a f\break a4 g a f g2 f2 
      \break a4 g a f a2 f2 g1 }
      \layout { indent = 0 }
    }
  }
}


\paper { ragged-right =  ##t }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Attachment: Untitled.pdf
Description: Adobe PDF document






Am 04.07.2010 um 19:24 schrieb James Bailey:

This looks similar to something I asked a while ago. Does this help:
http://lists.gnu.org/archive/html/lilypond-user/2009-05/msg00040.html
On 04.07.2010, at 13:45, Ole Schmidt wrote:

Dear List,

is it possible to center-align each system in the following snippet horizontally on the page?
Like:
                        |     -     |
|    ---    |
|   ------  |
|    ---    |
|     -     |



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.13.7"

\new Staff 
\time 4/4
\relative c' {

 c4 d e f \break
  g2 f \break 
  c4 d e f g a b a  \break 
  g4 f e g b a g

}
\paper { ragged-right = ##t indent = 0.0\cm }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

thanks  ole
_______________________________________________
lilypond-user mailing list



reply via email to

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