lilypond-user
[Top][All Lists]

Re: Guitar String Numbers

 From: Richard Schoeller Subject: Re: Guitar String Numbers Date: Tue, 30 Mar 2004 22:15:58 -0500

```The box code does expand the size of the enclosed object.  Depending on
alignment and placement within the markup, this can move the contents of
the box a little.  However, the size only changes by the thickness of
the lines.  I had to go back and look.  It's been a while.

When you put a circle around the object, the circle contacts the
bounding box at the corners.  Assuming a square object, that means that
the circle will sqrt(2)*width wide.  So the circle is 1.7x as wide as
the original bounding box (actually, plus the line thickness).

If you are circling the whole markup and it is a single letter, you
might be able to use center alignment and then tweak the position with
hspace and padding.  If you are trying to circle a portion of the
markup, you have a pretty hard time getting it placed.

On Tue, 2004-03-30 at 17:34, David Raleigh Arnold wrote:
> On Tuesday 30 March 2004 11:27, Mats Bengtsson wrote:
> > > Thanks for that clear explanation.  I thought that the benefit of
> > > using \markup was that lilypond "knows" about the space it takes
> > > up.  Is that the reason for using it, or is there some other or
> > > others?
> >
> > You mean using ^\markup{ text } compared to ^"text"? As long as
> > you don't use any of the markup commands, these alternatives should
> > be exactly equivalent.
> >
> > > BTW, that new search feature is *super*.
> >
> > (I'm not sure anyone understands what new search feature you refer
> > to, but I hope whoever feels responsible appreciates your gratitude
> > anyway.)
>
> You directed someone recently to the page which accesses the search
> of the archives, and the engine searched a phrase, not just a word.
> It's excellent.
>
> > > The centering problem is that the left edge of the ring is aligned
> > > with the left edge of the note, so the ring's contents are moved to
> > > the right.  It doesn't really put the number in the center of the
> > > circle, it puts the left edge of the circle where the left edge of
> > > the number would have been and moves the number to the right into
> > > the center of the circle.  In text, any other way would be very
> > > unsatisfactory. You want_g_string to become_(g)_string,
> > > not(g)string.
> > >
> > > I couldn't find any way of using backspaces (\$\\!\$) with \markup,
> > > nor could I figure out how to use \center-align with \\textcircled
> > > and \markup.  I just got errors or no effect.  Maybe there's a way.
> > >  I tried and failed to find it.  Perhaps since \center-align and
> > > \textcircled both do alignment, they don't play nice together.
> > > Just a guess.
> >
> > No! First of all, \center-align only works within a single markup and
> > makes sure that if you have several lines in your markup, these will
> > be aligned to each other.
>
> This works for some reason, with one line in the markup:
>
> cs'4^\markup{\center-align <\italic \bold "8va - - - - - "> }
>
> and \box does indeed box whatever you have without moving it to
> the right.  Maybe that has something to do with \box being
> able to use the bounding box of the letter without running into
> others?
>
> > single box and determines the alignment of that box based on the
> > setting of the self-alignment-X property of the TextScript or
> > RehearsalMark object, respectively. I'm still convinced that the
> > problems you notice, appear because LilyPond misinterpretes the
> > length of the markup (since it doesn't understand the LaTeX code), so
> > when it tries to center this imaginary box containing the full
> > markup, it fails.
> > The proper solution would be to add a markup command that circles its
> > argument, similarly to the \box command. This has been discussed
> > several times on the mailing list, but nobody has taken the time to
> > implement it. I'm afraid I don't know Postscript well enough to do
> > the job.
>
> I can see now why it's harder to do than \box.  At least the rings can
> be made and centered pretty well anyway, so it's not critical.  daveA
--
Dick Schoeller