bug-lilypond
[Top][All Lists]
Advanced

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

Re: doc modification


From: David Nalesnik
Subject: Re: doc modification
Date: Fri, 27 Jun 2014 16:19:25 -0500

Hi James,


On Thu, Jun 26, 2014 at 4:14 PM, James <address@hidden> wrote:

[...]


>
> What I have found is that if you use lilypond-book (which is what the
> documentation uses) I don't get the expected output but with lilypond in a
> *.ly file I do.
>
> If you are unfamiliar with how doc works in that sense, create a file
> called foo.tely and it has the content of
>
> --snip--
>
> \input texinfo @node Top
> @top
>
>
> @lilypond[ragged-right,quote]
>
> #(define (my-callback grob)
>
>   (let* (
>
>            ;; have we been split?
>
>            (orig (ly:grob-original grob))
>
>            ;; if yes, get the split pieces (our siblings)
>
>            (siblings (if (ly:grob? orig)
>
>                              (ly:spanner-broken-into orig)
>
>                              '())))
>
>     (if (and (>= (length siblings) 2)
>
>                  (eq? (car (last-pair siblings)) grob))
>
>         '(-2 . 5))))
>
>
> \relative c'' {
>
>   \override Tie.extra-offset = #my-callback
>
>   c1 ~ \break
>
>   c2 ~ c
>
> }
> @end lilypond
>
>
> @bye
>
> --snip--
>
> Then run
>
> lilypond-book --pdf foo.tely && texi2pdf foo.texi && evince foo.pdf
>
> I use this to check and create simple examples, snippets and the like.
>
>
I get the same result as you do when I run the above code.  However, the
moved tie also disappears when I substitute the code of the original doc
example in the template you give.

I don't know much about lilypond-book, but I assume this happens because
each line is treated individually, then linked together to form the whole.
 'extra-offset doesn't affect a system's dimensions, which is what
determines the image size.  That vertical offset moves the tie out of the
system and into oblivion.

This is pretty clear from the attached image.  I used the example in the
documentation, changing the pair to '(2 . 2.8).  The tie is cut off at the
system's extent.

I don't know enough about how the documentation examples are processed to
understand why this doesn't happen there too.

--David

Attachment: foo2.png
Description: PNG image


reply via email to

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