Re: new behavior of lilypond-book-preamble.ly?

2022-04-01 Thread Martin Tarenskeen
Op vrijdag 1 april 2022 om 19:05:42 +0200 schreef K. Blum 
:

Problem solved!
 Many thanks to Jean, Carl and Han-Wen for providing the solution.
 There is a new OOoLilyPond release: 

 Only for LilyPond versions 2.23.5 and later, the new options are 
inserted into the command line call.

 Nothing else has to be changed. I'm happy again. ;-)

 Cheers,
 Klaus


Thanks for the new release! Seems to work out-of-the-box here :-)

MT



Re: new behavior of lilypond-book-preamble.ly?

2022-04-01 Thread K. Blum



Am 30.03.2022 um 18:32 schrieb Carl Sorensen:


But the problem identified in the issue is related to adding a new
lilypond option (-dlilypondbookoutput), which I assume lilypond-book
calls but OOoLilyPond does not.  If I were trying to solve this
problem, that's where I would look to start.  I suspect that the new
option should be included when calling lilypond.



Han-Wen said that the scheme code needed for compatibility with
previous versions was two ly:set-option calls.  And ly:set-option
calls are available from the command line: (See the Usage Manual)
.



Problem solved!
Many thanks to Jean, Carl and Han-Wen for providing the solution.
There is a new OOoLilyPond release:
https://github.com/OOoLilyPond/OOoLilyPond/releases/tag/v1.1.5
Only for LilyPond versions 2.23.5 and later, the new options are
inserted into the command line call.
Nothing else has to be changed. I'm happy again. ;-)

Cheers,
Klaus


Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread K. Blum



Am 30.03.2022 um 18:32 schrieb Carl Sorensen:


I think that is not true.  Han-Wen said that the scheme code needed
for compatibility with previous versions was two ly:set-option calls. 
And ly:set-option calls are available from the command line: (See the
Usage Manual)
.

HTH,

Carl


Yes!!! That does the trick.
With   -dtall-page-formats=eps,png,pdf   and
-dseparate-page-formats=eps,png,pdf    I will be able to modify the
command line call as needed.

Thanks a million to Carl and Han-Wen!

Cheers,
Klaus


Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread K. Blum


Am 30.03.2022 um 18:32 schrieb Carl Sorensen:



On Wed, Mar 30, 2022 at 10:09 AM K. Blum  wrote:


Am 30.03.2022 um 17:59 schrieb Carl Sorensen:


But when I look at the code in OOoLilyPond/LilyPond.xba


I see that

 1. There is a way to check the LilyPond version
 2. The code already modifies include statements to add an
appropriate path
 3. The code builds the command used to call lilypond


Yes, that's true.

As long as a modification of *how LilyPond is called on the
command line* is sufficient, there is no problem at all.
Would that be possible?


I don't know.  But the problem identified in the issue is related to
adding a new lilypond option (-dlilypondbookoutput), which I assume
lilypond-book calls but OOoLilyPond does not.  If I were trying to
solve this problem, that's where I would look to start.  I suspect
that the new option should be included when calling lilypond.

But I have no experience with using OOoLilyPond, so I don't know this
for sure.


From what I read in Jean's response and on the GitLab issue page,
I get the impression that it would be necessary to change the
content of the *.ly files themselves. Is that correct?


I think that is not true.  Han-Wen said that the scheme code needed
for compatibility with previous versions was two ly:set-option calls. 
And ly:set-option calls are available from the command line: (See the
Usage Manual)
.

HTH,

Carl



Hi Carl,

thanks a lot, that sounds like really good news.
I'm short in time right now, but I'll check that out and report back here.

Cheers,
Klaus




Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread Carl Sorensen
On Wed, Mar 30, 2022 at 10:09 AM K. Blum  wrote:

>
> Am 30.03.2022 um 17:59 schrieb Carl Sorensen:
>
>
> But when I look at the code in OOoLilyPond/LilyPond.xba
> 
> I see that
>
>1. There is a way to check the LilyPond version
>2. The code already modifies include statements to add an appropriate
>path
>3. The code builds the command used to call lilypond
>
> Yes, that's true.
>
> As long as a modification of *how LilyPond is called on the command line*
> is sufficient, there is no problem at all.
> Would that be possible?
>

I don't know.  But the problem identified in the issue is related to adding
a new lilypond option (-dlilypondbookoutput), which I assume lilypond-book
calls but OOoLilyPond does not.  If I were trying to solve this problem,
that's where I would look to start.  I suspect that the new option should
be included when calling lilypond.

But I have no experience with using OOoLilyPond, so I don't know this for
sure.


>
> From what I read in Jean's response and on the GitLab issue page, I get
> the impression that it would be necessary to change the content of the *.ly
> files themselves. Is that correct?
>

I think that is not true.  Han-Wen said that the scheme code needed for
compatibility with previous versions was two ly:set-option calls.  And
ly:set-option calls are available from the command line: (See the Usage
Manual)

.

HTH,

Carl


Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread K. Blum


Am 30.03.2022 um 17:59 schrieb Carl Sorensen:


But when I look at the code in OOoLilyPond/LilyPond.xba

I see that

 1. There is a way to check the LilyPond version
 2. The code already modifies include statements to add an appropriate
path
 3. The code builds the command used to call lilypond


Yes, that's true.

As long as a modification of *how LilyPond is called on the command
line* is sufficient, there is no problem at all.
Would that be possible?

From what I read in Jean's response and on the GitLab issue page, I get
the impression that it would be necessary to change the content of the
*.ly files themselves. Is that correct?
This is where I would run into trouble.

Cheers,
Klaus


Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread Carl Sorensen
On Wed, Mar 30, 2022 at 9:25 AM K. Blum  wrote:

>
> Am 30.03.2022 um 17:15 schrieb Carl Sorensen:
>
>
> Is it not possible to make OOoLilyPond check for the LilyPond version and
> respond differently based on the LilyPond version?
>
> No, unfortunatly not:
> The use of lilypond-book-preamble.ly takes place in templates.
> These are dedicated *.ly files that can be modified by the user. Many
> people might build their own from scratch.
> Having OOoLilyPond responding differently would imply that users would
> have to modify all of their templates manually. I hope that there is a way
> to avoid that.
>

But when I look at the code in OOoLilyPond/LilyPond.xba

I see that

   1. There is a way to check the LilyPond version
   2. The code already modifies include statements to add an appropriate
   path
   3. The code builds the command used to call lilypond

Given these three things it seems that OOoLilyPond can modify its treatment
of both include files and the lilypond command to account for different
versions of LilyPond.  Whether it should have to or not is open for
discussion.

Thanks,

Carl

>
>


Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread K. Blum




Am 30.03.2022 um 17:42 schrieb Jean Abou Samra:



We provide convert-ly to do syntax changes more freely with less pain
for users. Could that not apply here?

Jean


If everything else fails, this could be some kind of last resort. ;-)
But it would still require that users do manual changes to their files
batch-wise.
And OOoLilyPond would have to deliver different templates according to
the user's Ly version. In addition, if a user updates his Ly version
across the 2.23.4 border, the above batch job still would apply.

I will follow your advice and post my thoughts on the GitLab issue page.

Cheers,
Klaus



Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread Jean Abou Samra




Le 30/03/2022 à 17:25, K. Blum a écrit :


Am 30.03.2022 um 17:15 schrieb Carl Sorensen:


Is it not possible to make OOoLilyPond check for the LilyPond version 
and respond differently based on the LilyPond version?



No, unfortunatly not:
The use of lilypond-book-preamble.ly takes place in templates.
These are dedicated *.ly files that can be modified by the user. Many 
people might build their own from scratch.
Having OOoLilyPond responding differently would imply that users would 
have to modify all of their templates manually. I hope that there is a 
way to avoid that.



We provide convert-ly to do syntax changes more freely with less pain 
for users. Could that not apply here?


Jean



Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread K. Blum


Am 30.03.2022 um 17:15 schrieb Carl Sorensen:


Is it not possible to make OOoLilyPond check for the LilyPond version
and respond differently based on the LilyPond version?


No, unfortunatly not:
The use of lilypond-book-preamble.ly takes place in templates.
These are dedicated *.ly files that can be modified by the user. Many
people might build their own from scratch.
Having OOoLilyPond responding differently would imply that users would
have to modify all of their templates manually. I hope that there is a
way to avoid that.

Cheers,
Klaus


Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread Carl Sorensen
On Wed, Mar 30, 2022 at 8:41 AM K. Blum  wrote:

>
> Am 30.03.2022 um 00:53 schrieb Jean Abou Samra:
> >
> > This is
> >
> > https://gitlab.com/lilypond/lilypond/-/issues/6235
> >
> > You can get cropping with -dcrop in the command line or
> > #(ly:set-option 'crop) in your .ly file, but it is different in that
> > it generates a separate .cropped.xxx file in addition to a non-cropped
> > main .xxx file (with xxx = pdf most of the time).
> >
> > Jean
> >
> Merci, Jean.
>
> May I hope that someday we will get back the original behavior?
> I'm asking because the OOoLilyPond extension for LibreOffice and
> OpenOffice heavily relies on lilypond-book-preamble.ly (and has done
> that ever since).
> For the sake of backward compatibility, it is absolutely desirable to
> continue in the same way. Changing the workflow inside OOoLilyPond could
> make it unusable for LilyPond versions prior to 2.23.5.
> See https://github.com/OOoLilyPond


Is it not possible to make OOoLilyPond check for the LilyPond version and
respond differently based on the LilyPond version?

Forcing strict backwards compatibility can prevent necessary improvements
in software.  LilyPond is currently wrestling with this issue in Guile.  We
would love to have Guile 2 (and 3) work just like 1.8, but that's not the
case, so we need to adjust LilyPond.

Perhaps the same is true of OOoLilyPond.  I don't know if that's the case
or not, but that discussion should be entered into, IMO, with people from
both development communities.

THanks,

Carl


Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread Jean Abou Samra

Le 30/03/2022 à 16:40, K. Blum a écrit :


Am 30.03.2022 um 00:53 schrieb Jean Abou Samra:


This is

https://gitlab.com/lilypond/lilypond/-/issues/6235

You can get cropping with -dcrop in the command line or
#(ly:set-option 'crop) in your .ly file, but it is different in that
it generates a separate .cropped.xxx file in addition to a non-cropped
main .xxx file (with xxx = pdf most of the time).

Jean


Merci, Jean.

May I hope that someday we will get back the original behavior?
I'm asking because the OOoLilyPond extension for LibreOffice and
OpenOffice heavily relies on lilypond-book-preamble.ly (and has done
that ever since).
For the sake of backward compatibility, it is absolutely desirable to
continue in the same way. Changing the workflow inside OOoLilyPond could
make it unusable for LilyPond versions prior to 2.23.5.
See https://github.com/OOoLilyPond




At this point I'm not sure it will stay the same, but I did
already request in the issue that we got back *some way*
to obtain the same.

Feel free to add your comments on the issue.

Thanks,
Jean




Re: new behavior of lilypond-book-preamble.ly?

2022-03-30 Thread K. Blum



Am 30.03.2022 um 00:53 schrieb Jean Abou Samra:


This is

https://gitlab.com/lilypond/lilypond/-/issues/6235

You can get cropping with -dcrop in the command line or
#(ly:set-option 'crop) in your .ly file, but it is different in that
it generates a separate .cropped.xxx file in addition to a non-cropped
main .xxx file (with xxx = pdf most of the time).

Jean


Merci, Jean.

May I hope that someday we will get back the original behavior?
I'm asking because the OOoLilyPond extension for LibreOffice and
OpenOffice heavily relies on lilypond-book-preamble.ly (and has done
that ever since).
For the sake of backward compatibility, it is absolutely desirable to
continue in the same way. Changing the workflow inside OOoLilyPond could
make it unusable for LilyPond versions prior to 2.23.5.
See https://github.com/OOoLilyPond

Cheers,
Klaus



Re: new behavior of lilypond-book-preamble.ly?

2022-03-29 Thread Jean Abou Samra




Le 29/03/2022 à 19:41, K. Blum a écrit :

Dear LilyPond community,

up to Ly 2.23.4, the use of
    \include "lilypond-book-preamble.ly"
removed any whitespace around the score.

As of Ly 2.23.5, the music is moved to the upper left corner, but the
paper size remains unchanged.

Is this a new (intended) behavior? Or have I just been missing something
important?
What do I need to do to get an entirely cropped image again? Thanks for
any hint.



This is

https://gitlab.com/lilypond/lilypond/-/issues/6235

You can get cropping with -dcrop in the command line or #(ly:set-option 
'crop) in your .ly file, but it is different in that it generates a 
separate .cropped.xxx file in addition to a non-cropped main .xxx file 
(with xxx = pdf most of the time).


Jean