OOolilypond Libre Office extension : insert object large as full page

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

OOolilypond Libre Office extension : insert object large as full page

Dario Marrini-2
Hi musicians,
I'm trying to use OOolilypond LO extension; I downloaded last stable version. 05,12, and the previous one, 0,5,11; it seems they are working properly, but they always produce a music object with a full page dimension, maing troubles in writing the document.

any idea?

thank you very much

dario

Schermata a 2020-02-09 13-54-04.png (140K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OOolilypond Libre Office extension : insert object large as full page

Klaus Blum
Hi Dario,


Dario Marrini-2 wrote
> ; it seems they are working
> properly, but they always produce a music object with a full page
> dimension, maing troubles in writing the document.

it seems that your template or your snippet is missing
\include "lilypond-book-preamble.ly"
This command is responsible for auto-cropping the image.

Maybe this is related to the image file format you have chosen. You can find
more information here:
https://github.com/openlilylib/LO-ly/wiki/Config#format

Could you post a screenshot of your OOoLilyPond window and your OOoLilyPond
Config dialog? Maybe this could help to find the problem.

Cheers,
Klaus




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

Reply | Threaded
Open this post in threaded view
|

Re: OOolilypond Libre Office extension : insert object large as full page

Klaus Blum
Klaus Blum wrote
> Could you post a screenshot of your OOoLilyPond window and your
> OOoLilyPond
> Config dialog? Maybe this could help to find the problem.

Version 0.4.0 and 0.5.0 are very old. You should remove them and try again
with the latest stable version 0.5.12.

Could you then provide the screenshots mentioned above?
And:
After inserting the full-page object, please start OOoLilyPond again and
click the "Ly Output" button. Now a new window will open. Please add a
screenshot of that as well.

I hope this will provide enough information to find the problem.  :)


Cheers,
Klaus



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

Reply | Threaded
Open this post in threaded view
|

Re: OOolilypond Libre Office extension : insert object large as full page

Dario Marrini-2
I thank all you,
but let me understand where this lilypond-preamble.ly should be, and I'm trying to create the default snippet, but it creates a full page object.
Here the screenshots.

Thanks

Dario

Il giorno dom 9 feb 2020 alle ore 15:29 Klaus Blum <[hidden email]> ha scritto:
Klaus Blum wrote
> Could you post a screenshot of your OOoLilyPond window and your
> OOoLilyPond
> Config dialog? Maybe this could help to find the problem.

Version 0.4.0 and 0.5.0 are very old. You should remove them and try again
with the latest stable version 0.5.12.

Could you then provide the screenshots mentioned above?
And:
After inserting the full-page object, please start OOoLilyPond again and
click the "Ly Output" button. Now a new window will open. Please add a
screenshot of that as well.

I hope this will provide enough information to find the problem.  :)


Cheers,
Klaus



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html


Schermata a 2020-02-09 16-17-39.png (291K) Download Attachment
Schermata a 2020-02-09 16-17-17.png (369K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OOolilypond Libre Office extension : insert object large as full page

Klaus Blum
Hi Dario,


Dario Marrini-2 wrote
> let me understand where this lilypond-preamble.ly should be

This file is a part of a complete LilyPond installation.
On Windows, it is located inside the LilyPond program folder, in the
subfolder
    /usr/share/lilypond/current/ly
On Linux and Mac, instead of "current", you will probably find a version
number.
Inside this folder, there should be a file named
    lilypond-book-preamble.ly

Your screenshots show no error message about this file missing, so I guess
you will find it there.

Let's do another test:
In the OOoLilyPond window, click the button "Open as temp. file in ext.
editor"
The Frescobaldi opens a file "OOoLilyPondTemp.ly"
Can you compile this file in Frescobaldi an make a screenshot again?
Let's see if a whole page is produced again or a small snippet.

Cheers,
Klaus




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

Reply | Threaded
Open this post in threaded view
|

Re: OOolilypond Libre Office extension : insert object large as full page

Klaus Blum
In reply to this post by Dario Marrini-2
Hi Dario,

Am 09.02.2020 um 16:18 schrieb Dario Marrini:
> but let me understand where this lilypond-preamble.ly
> <http://lilypond-preamble.ly> should be

another question: Is it a Mac or a Linux machine that you are working on?

Cheers,
Klaus

Reply | Threaded
Open this post in threaded view
|

Re: OOolilypond Libre Office extension : insert object large as full page

Dario Marrini-2
Absolutely Linux... :) I'm a Linux user since 1999, now I have been using Linux Mint since many years. I'm out now, I will do all the tests you suggested me as soon as I'm back.
Many thanks

Dario

Il dom 9 feb 2020, 16:51 Klaus Blum <[hidden email]> ha scritto:
Hi Dario,

Am 09.02.2020 um 16:18 schrieb Dario Marrini:
> but let me understand where this lilypond-preamble.ly
> <http://lilypond-preamble.ly> should be

another question: Is it a Mac or a Linux machine that you are working on?

Cheers,
Klaus
Reply | Threaded
Open this post in threaded view
|

Re: OOolilypond Libre Office extension : insert object large as full page

Dario Marrini-2
Hi,
I can confirm the lilypond-book-preamble.ly is in the correct location;I tried to compile Default template in Frescobaldi, it works but I can't realize if it creates a little picture or a page, because I can't find where is the resulting .pdf file....
I attach the screenshot

cheers
dario


Il giorno dom 9 feb 2020 alle ore 19:26 Dario Marrini <[hidden email]> ha scritto:
Absolutely Linux... :) I'm a Linux user since 1999, now I have been using Linux Mint since many years. I'm out now, I will do all the tests you suggested me as soon as I'm back.
Many thanks

Dario

Il dom 9 feb 2020, 16:51 Klaus Blum <[hidden email]> ha scritto:
Hi Dario,

Am 09.02.2020 um 16:18 schrieb Dario Marrini:
> but let me understand where this lilypond-preamble.ly
> <http://lilypond-preamble.ly> should be

another question: Is it a Mac or a Linux machine that you are working on?

Cheers,
Klaus

Schermata a 2020-02-09 22-01-35.png (331K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OOolilypond Libre Office extension : insert object large as full page

Klaus Blum
Hi Dario,

Am 09.02.2020 um 22:26 schrieb Dario Marrini:
> HI tried to compile Default template in Frescobaldi, it works but I
> can't realize if it creates a little picture or a page, because I
> can't find where is the resulting .pdf file....
>
on the right side of your screenshot I can see that a whole page is
created.

Just try this minimal snippet:

% ------------------------------------------
\relative c' {c e g c}
\include "lilypond-book-preamble.ly"
% ------------------------------------------

It should create a small image.
If you remove or comment out the second line (\include
"lilypond-book-preamble.ly"), you get a whole page again.

In the screenshots I'll attach the results that I get on my system.
There you can also see in the LilyPond output messages (at the bottom
left side) that in the version with the preamble there are some more
files created (*.tex, *.texi etc.).

Can you check if you get similar results?
If not, I suspect that there is a problem with your LilyPond
installation that is independent from OOoLilyPond. In that case, I could
ask here on the mailing list tomorrow if someone with more Linux
knowlegde already knows about that problem.

Cheers,
Klaus




ScreenShot1.png (96K) Download Attachment
ScreenShot2.png (86K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OOolilypond Libre Office extension : insert object large as full page

Dario Marrini-2
Thanks Klaus, I can cnogirm I get the same results.
So where do I have to put that \include?

This is the Default.ly tha t I can extract from the .oxt :
\transpose %{OOoLilyPondCustom1%}c c'%{OOoLilyPondEnd%}
{
%{OOoLilyPondCode%}% For getting started read (copy URL into your web browser):
% https://github.com/openlilylib/LO-ly
% <a href="http://lilypond.org/doc/stable/Documentation/learning/simple-notation%">http://lilypond.org/doc/stable/Documentation/learning/simple-notation%
%
% Use the "Custom 1" to transpose your music expression. E. g. try "e a'".

\key e \major e8 fis gis e fis8 b,4. | e2\fermata \bar "|."
%{OOoLilyPondEnd%}
}

\include "lilypond-book-preamble.ly"
#(set-global-staff-size %{OOoLilyPondStaffSize%}20%{OOoLilyPondEnd%})

\paper {
  #(define dump-extents #t)
  ragged-right = ##t
  line-width = %{OOoLilyPondLineWidth%}17\cm%{OOoLilyPondEnd%}
}

\layout {
  indent = #0
  \context {
    \Score
    \remove "Bar_number_engraver"
  }
}

that \include is present here, and if I copy and pas de Default.ly in Frescobaldi I get the correct thing (see the .png as attachment); but if I simply try to insert the music fragment by using the Default inside LibreOffice I get a whole page snippet...

Il giorno lun 10 feb 2020 alle ore 00:07 Klaus Blum <[hidden email]> ha scritto:
Hi Dario,

Am 09.02.2020 um 22:26 schrieb Dario Marrini:
> HI tried to compile Default template in Frescobaldi, it works but I
> can't realize if it creates a little picture or a page, because I
> can't find where is the resulting .pdf file....
>
on the right side of your screenshot I can see that a whole page is
created.

Just try this minimal snippet:

% ------------------------------------------
\relative c' {c e g c}
\include "lilypond-book-preamble.ly"
% ------------------------------------------

It should create a small image.
If you remove or comment out the second line (\include
"lilypond-book-preamble.ly"), you get a whole page again.

In the screenshots I'll attach the results that I get on my system.
There you can also see in the LilyPond output messages (at the bottom
left side) that in the version with the preamble there are some more
files created (*.tex, *.texi etc.).

Can you check if you get similar results?
If not, I suspect that there is a problem with your LilyPond
installation that is independent from OOoLilyPond. In that case, I could
ask here on the mailing list tomorrow if someone with more Linux
knowlegde already knows about that problem.

Cheers,
Klaus




Schermata a 2020-02-10 09-37-37.png (777K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: OOolilypond Libre Office extension : insert object large as full page

Dario Marrini-2
Hi Klaus, I found the problem

I don't know why, but the Default.ly in OOoLilyPond-templates directory , that's located in my home directory, /home/dario/, had no "\include lilypond-preamble.ly" line; I think because may be it was coming from prevoius version of the extension; after deleting every file and directory in my home referring to OOoLilypond, I removed the extension and I added it again, and now it works properly.
May be it would have been enough to do restore default templates, but I didn't think to do it.
Many thanks to all you, I hope  I have made a little contribution to someone.

Best regards

Dario

Il giorno lun 10 feb 2020 alle ore 10:10 Dario Marrini <[hidden email]> ha scritto:
Thanks Klaus, I can cnogirm I get the same results.
So where do I have to put that \include?

This is the Default.ly tha t I can extract from the .oxt :
\transpose %{OOoLilyPondCustom1%}c c'%{OOoLilyPondEnd%}
{
%{OOoLilyPondCode%}% For getting started read (copy URL into your web browser):
% https://github.com/openlilylib/LO-ly
% <a href="http://lilypond.org/doc/stable/Documentation/learning/simple-notation%" target="_blank">http://lilypond.org/doc/stable/Documentation/learning/simple-notation%
%
% Use the "Custom 1" to transpose your music expression. E. g. try "e a'".

\key e \major e8 fis gis e fis8 b,4. | e2\fermata \bar "|."
%{OOoLilyPondEnd%}
}

\include "lilypond-book-preamble.ly"
#(set-global-staff-size %{OOoLilyPondStaffSize%}20%{OOoLilyPondEnd%})

\paper {
  #(define dump-extents #t)
  ragged-right = ##t
  line-width = %{OOoLilyPondLineWidth%}17\cm%{OOoLilyPondEnd%}
}

\layout {
  indent = #0
  \context {
    \Score
    \remove "Bar_number_engraver"
  }
}

that \include is present here, and if I copy and pas de Default.ly in Frescobaldi I get the correct thing (see the .png as attachment); but if I simply try to insert the music fragment by using the Default inside LibreOffice I get a whole page snippet...

Il giorno lun 10 feb 2020 alle ore 00:07 Klaus Blum <[hidden email]> ha scritto:
Hi Dario,

Am 09.02.2020 um 22:26 schrieb Dario Marrini:
> HI tried to compile Default template in Frescobaldi, it works but I
> can't realize if it creates a little picture or a page, because I
> can't find where is the resulting .pdf file....
>
on the right side of your screenshot I can see that a whole page is
created.

Just try this minimal snippet:

% ------------------------------------------
\relative c' {c e g c}
\include "lilypond-book-preamble.ly"
% ------------------------------------------

It should create a small image.
If you remove or comment out the second line (\include
"lilypond-book-preamble.ly"), you get a whole page again.

In the screenshots I'll attach the results that I get on my system.
There you can also see in the LilyPond output messages (at the bottom
left side) that in the version with the preamble there are some more
files created (*.tex, *.texi etc.).

Can you check if you get similar results?
If not, I suspect that there is a problem with your LilyPond
installation that is independent from OOoLilyPond. In that case, I could
ask here on the mailing list tomorrow if someone with more Linux
knowlegde already knows about that problem.

Cheers,
Klaus



Reply | Threaded
Open this post in threaded view
|

Re[2]: OOolilypond Libre Office extension : insert object large as full page

Klaus Blum
Hi Dario,

Am 10.02.2020 um 10:17 schrieb Dario Marrini <[hidden email]>:
Hi Klaus, I found the problem

I don't know why, but the Default.ly in OOoLilyPond-templates directory , that's located in my home directory, /home/dario/, had no "\include lilypond-preamble.ly" line; I think because may be it was coming from prevoius version of the extension; after deleting every file and directory in my home referring to OOoLilypond, I removed the extension and I added it again, and now it works properly.
May be it would have been enough to do restore default templates, but I didn't think to do it.
That would have been my next suggestion - now that we know that your last test has been successful.
I'm surprised that the "include..." line was missing in your templates. AFAIK it is part of the (non-SVG) templates since OLy 0.4.0 which has been released about ten years ago.

I hope the extension will be useful for you. Some new features are coming soon.  :)


Cheers,
Klaus