lilypond-user
[Top][All Lists]
Advanced

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

Re: Has centered-on-parent gone away?


From: Trevor Bača
Subject: Re: Has centered-on-parent gone away?
Date: Sun, 28 Jun 2009 13:06:40 -0500



On Sun, Jun 28, 2009 at 12:59 PM, Trevor Bača <address@hidden> wrote:
Hi,

Does anyone remember how to align markup relative to the *center* of the parent notehead? I engineered a solution to exactly this question in a thread from September 2006 between me and Markus Schneider ...

   http://lists.gnu.org/archive/html/lilypond-user/2006-09/msg00088.html

... and, in fact, attached a PNG of exactly what I was looking for. That PNG is reattached here as notehead-centering.png.

But, alas, the old code, from 2.9.16, no longer appears to work. Here it is:


%%% BEGIN X-PARENT CENTERING SNIPPET %%%

\version "2.9.16"

textScriptCenterOnParent = \override TextScript #'X-offset =

      #(ly:make-simple-closure
        `(,+ ,(ly:make-simple-closure (list
 ly:self-alignment-interface::x-aligned-on-self))
      ,(ly:make-simple-closure (list
 ly:self-alignment-interface::centered-on-x-parent))))

\new Staff {
 \textScriptCenterOnParent
 \override TextScript #'self-alignment-X = #left
 c'4_\markup { MMM }
 \override TextScript #'self-alignment-X = #center
 c'4_\markup { MMM }
 \override TextScript #'self-alignment-X = #right
 c'4_\markup { MMM }
}

%%% END X-PARENT SNIPPET %%%


The result of running that bit of code under 2.12.2 is attached as weird-notehead-centering.png.

Odd, yes?

So does anyone know what's going on? (FWIW I've tried running convert-ly but convert-ly is currently finding the wrong version of Python on my system and refusing to start, which is frustrating since I've been using 2.5 forever; I haven't yet had time to figure out what to tell lilylib.require_python_version() to make it happy.)


One last clue: convert-ly makes no changes to the 2.9.16 snippet given above.


(Incidentally, convert-ly.py opens with

  #!/usr/bin/python

Could we change to

  #!/usr/bin/env python

to avoid problems with the script calling old versions of Python on a system that might have newer versions coinstalled?)


Trevor.


--
Trevor Bača
address@hidden

reply via email to

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