[Top][All Lists]

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

Re: Set indent based on instrument name (issue 6457049)

From: Phil Holmes
Subject: Re: Set indent based on instrument name (issue 6457049)
Date: Tue, 31 Jul 2012 15:21:07 +0100

----- Original Message ----- From: "David Kastrup" <address@hidden>
To: <address@hidden>
Sent: Tuesday, July 31, 2012 2:47 PM
Subject: Re: Set indent based on instrument name (issue 6457049)

Graham Percival <address@hidden> writes:

On Tue, Jul 31, 2012 at 02:14:17PM +0200, David Kastrup wrote:
And if you think this is purely hypothetical, check out

David, thank you for identifying a specific problematic example.

There are exceptions to every rule.  But if you are calling for an
exception because you lack the skills for following the rule, it is
unlikely that your skills are sufficient for correctly identifying the

I think this is a bit too far.  Phil is trying to solve a
long-standing *extremely* annoying bug for documentation writers
which has not attracted much attention from "real" programmers.

I can't actually help here since either problem description or what the
patch is trying to achieve is utterly absent from the issue.


"Set indent based on instrument name" is all that is described
anywhere.  _How_ the indent is supposed to be based on instrument names,
_when_ it is supposed to be based on instrument names, _what_ instrument
names it is supposed to be base on, _which_ indent is supposed to be
based on instrument names, _what_ problem this is trying to solve:

I draw a blank.  I can't even suggest what variables and organization to
use here since I have no clue what the problem is, and what the solution
tries to achieve.

Apologies - I intended to link to but clearly omitted to do so.

The problem is that the left indent of staves is fixed with no consideration of whether there is an instrument name to fit into that indent. So we can just about get away with "Violin", but any name like "Baroque violin with horse hair strings" simply falls off the left of the paper unless indent is manually adjusted. The same is true of short indent/short instrument name. In the same way that lilypond moves music to avoid clashes and overlaps, it should automatically adjust indent to accommodate the instrument names used. IMHO it's the current worst example of poor typesetting that lilypond provides.

What's worse is that the images used in the documentation _do_ shift right to accommodate instrument names, with the result that the image pushes off the left of the page, and black bars result. This means that _every_ snippet with an instrument name requires experimentation and hand crafting to make it fit the docs. Ugh.

I don't think that he realizes that he's asking for an exemption,
so no need to be rude about it.  Please either give us some hints
about how to store the information in an acceptable manner,

I can't since I have no idea what the code is supposed to do.  At the
current point of time I am pretty much reduced to stating that whatever
the code may be trying to do, it will not work reliably, and point out

But I can't help doing it right if I don't even get a chance to guess
_what_ to do right.

or wait until Keith or Mike or somebody else has time to help.  Phil
is *precisely* the kind of person that we want to be helping with
lilypond, so please don't discourage him.

Well, he is trying to take a shortcut here.  I can tell him that the
shortcut is a dead end, but I since I have no idea where he actually
wants to go, I can't suggest an alternative path.

David Kastrup

I'm not trying to take a shortcut - I'm wandering down the only road I can find. I first asked for some pointers as to how to do this a week ago, and since then I've been trying to work out a solution. It took me all day on Sunday to get the version that counted letters, and all day yesterday to work out how to go from markup->SCM->stencil->interval->length. I actually think that's a fair improvement and I'm pretty pleased with progress so far.

I now understand I need to either store the indent length in something to do with a score context, or re-initialise it whenever a new score is created. I'll have a go at working out how to do that, but I don't even understand how to access contexts from c++, so it seems like it would be a continuing number of days of poring over the code to find out.

Any pointers (pun not intended) you could give to help me on my way would be appreciated.

Phil Holmes

reply via email to

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