embed-source-code

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

embed-source-code

Thomas Morley-2
Hi all,

in  Usage Manual, Advanced command line options for LilyPond
one can read :

embed-source-code
Embed the LilyPond source files inside the generated PDF document.

Doesn't work with
lilypond -dembed-source-code=#t file.ly

Am I doing something wrong?
If so, howto?

Cheers,
  Harm

Reply | Threaded
Open this post in threaded view
|

Re: embed-source-code

Aaron Hill
On 2019-12-13 3:24 am, Thomas Morley wrote:

> Hi all,
>
> in  Usage Manual, Advanced command line options for LilyPond
> one can read :
>
> embed-source-code
> Embed the LilyPond source files inside the generated PDF document.
>
> Doesn't work with
> lilypond -dembed-source-code=#t file.ly
>
> Am I doing something wrong?
> If so, howto?

Version, platform, et cetera?

It works on my machine (WSL/Ubuntu 18.04, LilyPond 2.19.83), also just
saying "-dembed-source-code" seems sufficient to enable the flag.

I am using SumatraPDF to view the generated PDF, and the embedded source
shows up in the bookmarks.  Clicking the bookmark shows a dialog for
choosing where to save the attachment.


-- Aaron Hill

Reply | Threaded
Open this post in threaded view
|

Re: embed-source-code

Thomas Morley-2
Am Fr., 13. Dez. 2019 um 13:17 Uhr schrieb Aaron Hill
<[hidden email]>:

>
> On 2019-12-13 3:24 am, Thomas Morley wrote:
> > Hi all,
> >
> > in  Usage Manual, Advanced command line options for LilyPond
> > one can read :
> >
> > embed-source-code
> > Embed the LilyPond source files inside the generated PDF document.
> >
> > Doesn't work with
> > lilypond -dembed-source-code=#t file.ly
> >
> > Am I doing something wrong?
> > If so, howto?
>
> Version, platform, et cetera?
>
> It works on my machine (WSL/Ubuntu 18.04, LilyPond 2.19.83), also just
> saying "-dembed-source-code" seems sufficient to enable the flag.
>
> I am using SumatraPDF to view the generated PDF, and the embedded source
> shows up in the bookmarks.  Clicking the bookmark shows a dialog for
> choosing where to save the attachment.
>
>
> -- Aaron Hill

I'm on Ubuntu 18.04 64-bit
LilyPond 2.19.83 or any other version
For viewing PDF I use evince or FoxitReader.

I've never seen any source-code anywhere
Apart from the cited sentence from the Usage Manual there is no
documentation, no regtest, nothing.
Obviously I've no clue what to do.

It may be that this feature isn't what I want at all, though without
having it working I can't judge.

What I really want Is to print the source-code of my file at the top
of the generated image.
For now I try to modify verbatim-file-markup to be a
markup-list-command and to create other commands to select, delete,
format it as I like.

Cheers,
  Harm

Reply | Threaded
Open this post in threaded view
|

Re: embed-source-code

Aaron Hill
On 2019-12-13 4:35 am, Thomas Morley wrote:

> I'm on Ubuntu 18.04 64-bit
> LilyPond 2.19.83 or any other version
> For viewing PDF I use evince or FoxitReader.
>
> I've never seen any source-code anywhere
> Apart from the cited sentence from the Usage Manual there is no
> documentation, no regtest, nothing.
> Obviously I've no clue what to do.
>
> It may be that this feature isn't what I want at all, though without
> having it working I can't judge.
>
> What I really want Is to print the source-code of my file at the top
> of the generated image.
> For now I try to modify verbatim-file-markup to be a
> markup-list-command and to create other commands to select, delete,
> format it as I like.

The feature embeds the source as an *attachment* within the PDF.  I
would assume both evince and Foxit know how to handle attachments.

But it sounds like this is not what you need.  Rather, what would be
nice is to have something like Knuth's CWEB for beautifully formatting
LilyPond syntax for print.


-- Aaron Hill

Reply | Threaded
Open this post in threaded view
|

Re: embed-source-code

Thomas Morley-2
Am Fr., 13. Dez. 2019 um 13:54 Uhr schrieb Aaron Hill
<[hidden email]>:

>
> On 2019-12-13 4:35 am, Thomas Morley wrote:
> > I'm on Ubuntu 18.04 64-bit
> > LilyPond 2.19.83 or any other version
> > For viewing PDF I use evince or FoxitReader.
> >
> > I've never seen any source-code anywhere
> > Apart from the cited sentence from the Usage Manual there is no
> > documentation, no regtest, nothing.
> > Obviously I've no clue what to do.
> >
> > It may be that this feature isn't what I want at all, though without
> > having it working I can't judge.
> >
> > What I really want Is to print the source-code of my file at the top
> > of the generated image.
> > For now I try to modify verbatim-file-markup to be a
> > markup-list-command and to create other commands to select, delete,
> > format it as I like.
>
> The feature embeds the source as an *attachment* within the PDF.  I
> would assume both evince and Foxit know how to handle attachments.

If so, then they refuse to tell me how to participate.
And I will not spending hours to research, thus I gave up on this

>
> But it sounds like this is not what you need.  Rather, what would be
> nice is to have something like Knuth's CWEB for beautifully formatting
> LilyPond syntax for print.

Thanks for the hint!
A very quick glance over the website made me think this is probably usable.
Though, it will probably need too much work to get familar with it.

Thus I'll do it now manually.

Nevertheless, many thanks,
  Harm

Reply | Threaded
Open this post in threaded view
|

Re: embed-source-code

Federico Bruni-2
Il giorno ven 13 dic 2019 alle 23:48, Thomas Morley
<[hidden email]> ha scritto:
>>  The feature embeds the source as an *attachment* within the PDF.  I
>>  would assume both evince and Foxit know how to handle attachments.
>
> If so, then they refuse to tell me how to participate.
> And I will not spending hours to research, thus I gave up on this

Harm, Evince has an attachment icon on the left sidebar: if you click
on it you'll see the attachments and you'll be able to save them or
open them (opening the files didn't work on a system where I have
Evince as flatpak, but I guess it's a flatpak issue).