lilypond-devel
[Top][All Lists]
Advanced

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

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


From: David Kastrup
Subject: Re: Set indent based on instrument name (issue 6457049)
Date: Tue, 31 Jul 2012 16:40:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

"Phil Holmes" <address@hidden> writes:

>> I can't actually help here since either problem description or what the
>> patch is trying to achieve is utterly absent from the issue.
>>
>> <URL:http://code.google.com/p/lilypond/issues/detail?id=2703>
>>
>> "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
> http://code.google.com/p/lilypond/issues/detail?id=766 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.

So _how_ are you trying to accommodate?  Increase indent until the
instrument name fits wholly in the text width?  Let it stick out
somewhat?  How much?

> 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.

They probably also shift left, basically ignoring indent completely.
Cropping images based on contents rather than extent is always asking
for problems.

> 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.

Where do indent and shortindent end up being used?  That's where the
results of your calculations likely need to be available.  And what kind
of variables you need to use depends on how the results from your
calculation are supposed to travel to the site of use.

-- 
David Kastrup



reply via email to

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