Incorrect cropping when integrating score with lyluatex

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Incorrect cropping when integrating score with lyluatex

Claire Meyer-2
Hi all,

I'm integrating a score with latex via lyluatex. The .ly file is finished, and gives no error; the score produced looks good, and I'm at the step where I just integrate with latex, and touch up the things that need retouching. I insert system by system, and unfortunately, some dynamics are mostly cropped out :

image.png
The scribble between the two systems is a dynamic mark that applies to the lower system. I looked in the temporary files generated by lyluatex, and the pdfs are cropped in such a manner that all my higher-placed-within-the-system dynamics are mostly removed.

Those dynamics are all custom dynamic marks that I constructed like :

mydyn = \tweak DynamicText.self-alignment-X #LEFT
#(make-dynamic-script
(markup
#:with-dimensions '(0 . 5) '(0 . 0) #:line
(#:normal-text #:italic "<whatever my dynamic mark says>")))

They were badly placed with automatic placement (overlapping with the phrasing slurs, mostly), so I specified in my score for those dynamics that :

\new Dynamics \with {
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 6)
(minimum-distance . 5)
(padding . 3)
(stretchability . 6))
} { \dynamicsA }

Any idea how to solve that problem ? I tried to include everything relevant to not just code dump things here, but ask away if I forgot something.

Thanks,
Claire
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect cropping when integrating score with lyluatex

Urs Liska-3
Hi Claire,

I'm not sure how the manual vertical positioning interacts with the cropping, but you can test further  by inserting 
  \include "lilypond-book-preamble.ly" in your file.
This will give you one cropped pdf plus a number of indexed pdf files for each system. The cropping issues should be visible there too and might give some more clues for understanding the issue.

The most common cause for such cropping issues would be (not in your case) moving stuff with extra-offset, which is then not included in the obkjects' X/Y-extent.

Urs

Am Sonntag, den 30.08.2020, 11:12 +0200 schrieb Claire Meyer:
Hi all,

I'm integrating a score with latex via lyluatex. The .ly file is finished, and gives no error; the score produced looks good, and I'm at the step where I just integrate with latex, and touch up the things that need retouching. I insert system by system, and unfortunately, some dynamics are mostly cropped out :

image.png
The scribble between the two systems is a dynamic mark that applies to the lower system. I looked in the temporary files generated by lyluatex, and the pdfs are cropped in such a manner that all my higher-placed-within-the-system dynamics are mostly removed.

Those dynamics are all custom dynamic marks that I constructed like :

mydyn = \tweak DynamicText.self-alignment-X #LEFT
#(make-dynamic-script
(markup
#:with-dimensions '(0 . 5) '(0 . 0) #:line
(#:normal-text #:italic "<whatever my dynamic mark says>")))

They were badly placed with automatic placement (overlapping with the phrasing slurs, mostly), so I specified in my score for those dynamics that :

\new Dynamics \with {
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 6)
(minimum-distance . 5)
(padding . 3)
(stretchability . 6))
} { \dynamicsA }

Any idea how to solve that problem ? I tried to include everything relevant to not just code dump things here, but ask away if I forgot something.

Thanks,
Claire
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect cropping when integrating score with lyluatex

Claire Meyer-2
Hi Urs,

Huh !
> This will give you one cropped pdf plus a number of indexed pdf files for each system. The cropping issues should be visible there too and might give some more clues for understanding the issue.
Yep, a 100%. I attached the outputs for one system where the problem is visible; one from lilypond, one from lilypond + lyluatex. The cropped pdf with all systems has no cropping issue.

Is there anything else I can provide  ?
Claire

On Sun, Aug 30, 2020 at 11:26 AM Urs Liska <[hidden email]> wrote:
Hi Claire,

I'm not sure how the manual vertical positioning interacts with the cropping, but you can test further  by inserting 
  \include "lilypond-book-preamble.ly" in your file.
This will give you one cropped pdf plus a number of indexed pdf files for each system. The cropping issues should be visible there too and might give some more clues for understanding the issue.

The most common cause for such cropping issues would be (not in your case) moving stuff with extra-offset, which is then not included in the obkjects' X/Y-extent.

Urs

Am Sonntag, den 30.08.2020, 11:12 +0200 schrieb Claire Meyer:
Hi all,

I'm integrating a score with latex via lyluatex. The .ly file is finished, and gives no error; the score produced looks good, and I'm at the step where I just integrate with latex, and touch up the things that need retouching. I insert system by system, and unfortunately, some dynamics are mostly cropped out :

image.png
The scribble between the two systems is a dynamic mark that applies to the lower system. I looked in the temporary files generated by lyluatex, and the pdfs are cropped in such a manner that all my higher-placed-within-the-system dynamics are mostly removed.

Those dynamics are all custom dynamic marks that I constructed like :

mydyn = \tweak DynamicText.self-alignment-X #LEFT
#(make-dynamic-script
(markup
#:with-dimensions '(0 . 5) '(0 . 0) #:line
(#:normal-text #:italic "<whatever my dynamic mark says>")))

They were badly placed with automatic placement (overlapping with the phrasing slurs, mostly), so I specified in my score for those dynamics that :

\new Dynamics \with {
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 6)
(minimum-distance . 5)
(padding . 3)
(stretchability . 6))
} { \dynamicsA }

Any idea how to solve that problem ? I tried to include everything relevant to not just code dump things here, but ask away if I forgot something.

Thanks,
Claire

gnossienne_1-10.pdf (60K) Download Attachment
8fe7dda4d465cd78b567b9895d1b6583-10.pdf (50K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect cropping when integrating score with lyluatex

Claire Meyer-2
Adding those, in case they are useful.

On Sun, Aug 30, 2020 at 11:57 AM Claire Meyer <[hidden email]> wrote:
Hi Urs,

Huh !
> This will give you one cropped pdf plus a number of indexed pdf files for each system. The cropping issues should be visible there too and might give some more clues for understanding the issue.
Yep, a 100%. I attached the outputs for one system where the problem is visible; one from lilypond, one from lilypond + lyluatex. The cropped pdf with all systems has no cropping issue.

Is there anything else I can provide  ?
Claire

On Sun, Aug 30, 2020 at 11:26 AM Urs Liska <[hidden email]> wrote:
Hi Claire,

I'm not sure how the manual vertical positioning interacts with the cropping, but you can test further  by inserting 
  \include "lilypond-book-preamble.ly" in your file.
This will give you one cropped pdf plus a number of indexed pdf files for each system. The cropping issues should be visible there too and might give some more clues for understanding the issue.

The most common cause for such cropping issues would be (not in your case) moving stuff with extra-offset, which is then not included in the obkjects' X/Y-extent.

Urs

Am Sonntag, den 30.08.2020, 11:12 +0200 schrieb Claire Meyer:
Hi all,

I'm integrating a score with latex via lyluatex. The .ly file is finished, and gives no error; the score produced looks good, and I'm at the step where I just integrate with latex, and touch up the things that need retouching. I insert system by system, and unfortunately, some dynamics are mostly cropped out :

image.png
The scribble between the two systems is a dynamic mark that applies to the lower system. I looked in the temporary files generated by lyluatex, and the pdfs are cropped in such a manner that all my higher-placed-within-the-system dynamics are mostly removed.

Those dynamics are all custom dynamic marks that I constructed like :

mydyn = \tweak DynamicText.self-alignment-X #LEFT
#(make-dynamic-script
(markup
#:with-dimensions '(0 . 5) '(0 . 0) #:line
(#:normal-text #:italic "<whatever my dynamic mark says>")))

They were badly placed with automatic placement (overlapping with the phrasing slurs, mostly), so I specified in my score for those dynamics that :

\new Dynamics \with {
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 6)
(minimum-distance . 5)
(padding . 3)
(stretchability . 6))
} { \dynamicsA }

Any idea how to solve that problem ? I tried to include everything relevant to not just code dump things here, but ask away if I forgot something.

Thanks,
Claire

gnossienne_1-systems.count (4 bytes) Download Attachment
gnossienne_1-systems.texi (360 bytes) Download Attachment
gnossienne_1-systems.tex (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect cropping when integrating score with lyluatex

Urs Liska-3
In reply to this post by Claire Meyer-2
So this is an issue with manual vertical spacing in LilyPond, not wirt lyluatex.

Unfortunately I've never really been familiar with this, so someone else should step in.

The underlying issue is that LilyPond isn't really aware of the actual extent of the system when cropping. This happens when you move items around by overridindǵ their extra-offset properties but seems an issue too ehen pushing around the staves themselves.

I don't know if overriding the Y-extent of the dynamics will help here.

ursHTH anyway


Am Sonntag, den 30.08.2020, 11:57 +0200 schrieb Claire Meyer:
Hi Urs,

Huh !
> This will give you one cropped pdf plus a number of indexed pdf files for each system. The cropping issues should be visible there too and might give some more clues for understanding the issue.
Yep, a 100%. I attached the outputs for one system where the problem is visible; one from lilypond, one from lilypond + lyluatex. The cropped pdf with all systems has no cropping issue.

Is there anything else I can provide  ?
Claire

On Sun, Aug 30, 2020 at 11:26 AM Urs Liska <[hidden email]> wrote:
Hi Claire,

I'm not sure how the manual vertical positioning interacts with the cropping, but you can test further  by inserting 
  \include "lilypond-book-preamble.ly" in your file.
This will give you one cropped pdf plus a number of indexed pdf files for each system. The cropping issues should be visible there too and might give some more clues for understanding the issue.

The most common cause for such cropping issues would be (not in your case) moving stuff with extra-offset, which is then not included in the obkjects' X/Y-extent.

Urs

Am Sonntag, den 30.08.2020, 11:12 +0200 schrieb Claire Meyer:
Hi all,

I'm integrating a score with latex via lyluatex. The .ly file is finished, and gives no error; the score produced looks good, and I'm at the step where I just integrate with latex, and touch up the things that need retouching. I insert system by system, and unfortunately, some dynamics are mostly cropped out :

image.png
The scribble between the two systems is a dynamic mark that applies to the lower system. I looked in the temporary files generated by lyluatex, and the pdfs are cropped in such a manner that all my higher-placed-within-the-system dynamics are mostly removed.

Those dynamics are all custom dynamic marks that I constructed like :

mydyn = \tweak DynamicText.self-alignment-X #LEFT
#(make-dynamic-script
(markup
#:with-dimensions '(0 . 5) '(0 . 0) #:line
(#:normal-text #:italic "<whatever my dynamic mark says>")))

They were badly placed with automatic placement (overlapping with the phrasing slurs, mostly), so I specified in my score for those dynamics that :

\new Dynamics \with {
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 6)
(minimum-distance . 5)
(padding . 3)
(stretchability . 6))
} { \dynamicsA }

Any idea how to solve that problem ? I tried to include everything relevant to not just code dump things here, but ask away if I forgot something.

Thanks,
Claire
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect cropping when integrating score with lyluatex

Claire Meyer-2
> So this is an issue with manual vertical spacing in LilyPond, not wirt lyluatex.
> Unfortunately I've never really been familiar with this, so someone else should step in.
I'm not familiar with it neither :/

> I don't know if overriding the Y-extent of the dynamics will help here.
I've tried to look that up, but I'm lost about how to do it.

> HTH anyway
It does, thank you very much. It doesn't solve the problem, but it narrows it down, so yeah :)

Claire

On Sun, Aug 30, 2020 at 12:09 PM Urs Liska <[hidden email]> wrote:
So this is an issue with manual vertical spacing in LilyPond, not wirt lyluatex.

Unfortunately I've never really been familiar with this, so someone else should step in.

The underlying issue is that LilyPond isn't really aware of the actual extent of the system when cropping. This happens when you move items around by overridindǵ their extra-offset properties but seems an issue too ehen pushing around the staves themselves.

I don't know if overriding the Y-extent of the dynamics will help here.

ursHTH anyway


Am Sonntag, den 30.08.2020, 11:57 +0200 schrieb Claire Meyer:
Hi Urs,

Huh !
> This will give you one cropped pdf plus a number of indexed pdf files for each system. The cropping issues should be visible there too and might give some more clues for understanding the issue.
Yep, a 100%. I attached the outputs for one system where the problem is visible; one from lilypond, one from lilypond + lyluatex. The cropped pdf with all systems has no cropping issue.

Is there anything else I can provide  ?
Claire

On Sun, Aug 30, 2020 at 11:26 AM Urs Liska <[hidden email]> wrote:
Hi Claire,

I'm not sure how the manual vertical positioning interacts with the cropping, but you can test further  by inserting 
  \include "lilypond-book-preamble.ly" in your file.
This will give you one cropped pdf plus a number of indexed pdf files for each system. The cropping issues should be visible there too and might give some more clues for understanding the issue.

The most common cause for such cropping issues would be (not in your case) moving stuff with extra-offset, which is then not included in the obkjects' X/Y-extent.

Urs

Am Sonntag, den 30.08.2020, 11:12 +0200 schrieb Claire Meyer:
Hi all,

I'm integrating a score with latex via lyluatex. The .ly file is finished, and gives no error; the score produced looks good, and I'm at the step where I just integrate with latex, and touch up the things that need retouching. I insert system by system, and unfortunately, some dynamics are mostly cropped out :

image.png
The scribble between the two systems is a dynamic mark that applies to the lower system. I looked in the temporary files generated by lyluatex, and the pdfs are cropped in such a manner that all my higher-placed-within-the-system dynamics are mostly removed.

Those dynamics are all custom dynamic marks that I constructed like :

mydyn = \tweak DynamicText.self-alignment-X #LEFT
#(make-dynamic-script
(markup
#:with-dimensions '(0 . 5) '(0 . 0) #:line
(#:normal-text #:italic "<whatever my dynamic mark says>")))

They were badly placed with automatic placement (overlapping with the phrasing slurs, mostly), so I specified in my score for those dynamics that :

\new Dynamics \with {
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 6)
(minimum-distance . 5)
(padding . 3)
(stretchability . 6))
} { \dynamicsA }

Any idea how to solve that problem ? I tried to include everything relevant to not just code dump things here, but ask away if I forgot something.

Thanks,
Claire
Reply | Threaded
Open this post in threaded view
|

Re: Incorrect cropping when integrating score with lyluatex

Aaron Hill
In reply to this post by Claire Meyer-2
On 2020-08-30 2:12 am, Claire Meyer wrote:

> Hi all,
>
> I'm integrating a score with latex via lyluatex. The .ly file is
> finished,
> and gives no error; the score produced looks good, and I'm at the step
> where I just integrate with latex, and touch up the things that need
> retouching. I insert system by system, and unfortunately, some dynamics
> are
> mostly cropped out :
>
> [image: image.png]
> The scribble between the two systems is a dynamic mark that applies to
> the
> lower system. I looked in the temporary files generated by lyluatex,
> and
> the pdfs are cropped in such a manner that all my
> higher-placed-within-the-system dynamics are mostly removed.
>
> Those dynamics are all custom dynamic marks that I constructed like :
>
> mydyn = \tweak DynamicText.self-alignment-X #LEFT
> #(make-dynamic-script
> (markup
> #:with-dimensions '(0 . 5) '(0 . 0) #:line
> (#:normal-text #:italic "<whatever my dynamic mark says>")))

Be careful using \withDimensions, especially when specifying extents
that do not accurately represent the content.  In this case, you are
telling LilyPond that the text has no vertical extent.

I would imagine the issue(s) stem from this.  I suggest allowing
LilyPond to manage extents on its own, which would give it the
information needed to properly crop.


-- Aaron Hill

Reply | Threaded
Open this post in threaded view
|

Re: Incorrect cropping when integrating score with lyluatex

Aaron Hill
On 2020-08-30 4:29 am, Aaron Hill wrote:

> On 2020-08-30 2:12 am, Claire Meyer wrote:
>> Those dynamics are all custom dynamic marks that I constructed like :
>>
>> mydyn = \tweak DynamicText.self-alignment-X #LEFT
>> #(make-dynamic-script
>> (markup
>> #:with-dimensions '(0 . 5) '(0 . 0) #:line
>> (#:normal-text #:italic "<whatever my dynamic mark says>")))
>
> Be careful using \withDimensions, especially when specifying extents
> that do not accurately represent the content.  In this case, you are
> telling LilyPond that the text has no vertical extent.

And by "\withDimensions" I of course meant "\with-dimensions" (or
"#:with-dimensions" as you are using the Scheme syntax).


> I would imagine the issue(s) stem from this.  I suggest allowing
> LilyPond to manage extents on its own, which would give it the
> information needed to properly crop.

-- Aaron Hill

Reply | Threaded
Open this post in threaded view
|

Re: Incorrect cropping when integrating score with lyluatex

Claire Meyer-2
Aaaah, yes, so the problem I had all along which I bothered several people for was between my chair and my keyboard all along...

@Aaron, thank you very much for pointing that to me, I'm such a moron.
@Urs, thank you very much for your time and narrowing down the problem.

And sorry both for wasting your time with such a trivial problem T___T

Claire

On Sun, Aug 30, 2020 at 1:39 PM Aaron Hill <[hidden email]> wrote:
On 2020-08-30 4:29 am, Aaron Hill wrote:
> On 2020-08-30 2:12 am, Claire Meyer wrote:
>> Those dynamics are all custom dynamic marks that I constructed like :
>>
>> mydyn = \tweak DynamicText.self-alignment-X #LEFT
>> #(make-dynamic-script
>> (markup
>> #:with-dimensions '(0 . 5) '(0 . 0) #:line
>> (#:normal-text #:italic "<whatever my dynamic mark says>")))
>
> Be careful using \withDimensions, especially when specifying extents
> that do not accurately represent the content.  In this case, you are
> telling LilyPond that the text has no vertical extent.

And by "\withDimensions" I of course meant "\with-dimensions" (or
"#:with-dimensions" as you are using the Scheme syntax).


> I would imagine the issue(s) stem from this.  I suggest allowing
> LilyPond to manage extents on its own, which would give it the
> information needed to properly crop.

-- Aaron Hill