Re: How to really center a text above a note?

2009-07-07 Thread Trevor Bača
On Tue, Jul 7, 2009 at 10:33 AM, Neil Puttock wrote: > 2009/7/5 Mark Polesky : > > > If the "unsafe assumption" on line 8 could be addressed, I think it > > should be implemented in the source. Neil? > > I can probably do a loop to pick up the first head, i.e., filtering > out any grobs which don

Re: How to really center a text above a note?

2009-07-07 Thread Neil Puttock
2009/7/5 Mark Polesky : > If the "unsafe assumption" on line 8 could be addressed, I think it > should be implemented in the source. Neil? I can probably do a loop to pick up the first head, i.e., filtering out any grobs which don't support rhythmic-head-interface. I don't think it's suitable fo

Re: How to really center a text above a note?

2009-07-05 Thread Mark Polesky
Valentin Villenave wrote: > 2009/6/29 Neil Puttock : > > With apologies to Michael, here's a simpler method for centring > > text using a grob callback, which effectively does the same as > > your old code by retrieving the notehead (or rest) from the > > PaperColumn then mimicking the centered_on

Re: How to really center a text above a note?

2009-07-05 Thread Valentin Villenave
2009/6/29 Neil Puttock : > With apologies to Michael, here's a simpler method for centring text > using a grob callback, which effectively does the same as your old > code by retrieving the notehead (or rest) from the PaperColumn then > mimicking the centered_on_x_parent callback: Although I've be

Re: How to really center a text above a note?

2009-07-04 Thread Michael Lauer
Neil Puttock gmail.com> writes: > > > With apologies to Michael, here's a simpler method for centring text > using a grob callback, which effectively does the same as your old > code by retrieving the notehead (or rest) from the PaperColumn then > mimicking the centered_on_x_parent callback: >

Re: How to really center a text above a note?

2009-06-29 Thread Neil Puttock
2009/6/29 Trevor Bača : > ... is it possible that TextScripts *used to* have NoteHeads as grob-parents > (at least in 2.9.16) and have since changed to have PaperColumns as grob > parents, thus rendering the settings from 2.9.16 no longer functional? Michael's correct. The Text_engraver used to

Re: How to really center a text above a note?

2009-06-29 Thread Mark Polesky
Trevor Bača wrote: > Or is something else now going that would prevent calls to > Self_alignment_interface::aligned_on_x_parent and > centered_on_x_parent from working as they did previously? Trevor, I honestly have no idea if this is relevant here, but recently I noticed that in define-grobs.scm

Re: How to really center a text above a note?

2009-06-29 Thread Mats Bengtsson
A hint is to look at how the alignment is done for articulations, i.e. Script layout objects, where the X-offset property is the function script-interface::calc-x-offset defined in scm/output-lib.scm. It doesn't work to use that function directly for TextScript objects, but you can probably use

Re: How to really center a text above a note?

2009-06-29 Thread Trevor Bača
On Sun, May 24, 2009 at 8:36 PM, Michael Lauer wrote: > Wilbert Berendsen xs4all.nl> writes: > > > > > Op zondag 24 mei 2009, schreef madMuze: > > > perhaps a Schemer could pull the X-extent info from the attachment > point > > > notehead, divide it by 2 and send that to the offset. Meanwhile, i

Re: How to really center a text above a note?

2009-05-27 Thread Wilbert Berendsen
Op maandag 25 mei 2009, schreef Michael Lauer: > I think the difference is that LyricTexts have NoteHeads as grob-parents, > while TextScripts have PaperColumns. > (...) Many thanks, I'll try to dig this further out! best regards, Wilbert Berendsen -- Frescobaldi, LilyPond editor for KDE: http:

Re: How to really center a text above a note?

2009-05-24 Thread Michael Lauer
Wilbert Berendsen xs4all.nl> writes: > > Op zondag 24 mei 2009, schreef madMuze: > > perhaps a Schemer could pull the X-extent info from the attachment point > > notehead, divide it by 2 and send that to the offset. Meanwhile, it may to > > helpful to know that: > > quarter-note head width = ab

Re: How to really center a text above a note?

2009-05-24 Thread Wilbert Berendsen
Op zondag 24 mei 2009, schreef madMuze: > perhaps a Schemer could pull the X-extent info from the attachment point > notehead, divide it by 2 and send that to the offset. Meanwhile, it may to > helpful to know that: > quarter-note head width = about 1.31 > half-note head width = about 1.39 > who

RE: How to really center a text above a note?

2009-05-24 Thread madMuze
units) David > There must be a way to really center a simple text above a note. Offset the text by half the width of the notehead: -- View this message in context: http://www.nabble.com/How-to-really-center-a-text-above-a-note--tp23687958p23695313.html Sent from the Gnu - Lilypond - U

RE: How to really center a text above a note?

2009-05-24 Thread Kieren MacMillan
Hi Wilbert, > There must be a way to really center a simple text above a note. > But [this centers] the text above the *left* side of the note: > { > \once \override TextScript #'self-alignment-X = #CENTER > c'4-"text" > } > How can I center a text or markup above the *center* of the note/chord?

How to really center a text above a note?

2009-05-23 Thread Wilbert Berendsen
Hi, There must be a way to really center a simple text above a note. But these two lines center the text above the *left* side of the note: { c'4-\markup\center-align text } { \once \override TextScript #'self-alignment-X = #CENTER c'4-"text" } How can I center a text or markup above the