[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-bug
Subject:    Re: Fwd: [Feature request] attach lilypond code in pdf.
From:       Reinhold Kainhofer <reinhold () kainhofer ! com>
Date:       2012-07-09 12:31:19
Message-ID: 4FFACF17.705 () kainhofer ! com
[Download RAW message or body]


On 2012-07-09 10:49, Phil Holmes wrote:
> "-Eluze" <eluzew@gmail.com> wrote in message 
> news:34131686.post@talk.nabble.com...
>>
>>
>> Bernard Hurley-2 wrote:
>>>
>>> On Sun, Jul 08, 2012 at 11:12:40PM +0100, Colin Hall wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm a pretty much new user of lilypond and I have an idea for a almost
>>>> dummy new feature: automatically attach lilypond code in pdf.
>>>> With pdf files it is possible to attach a file into it.
>>>
>>>
>>> What a great idea!
>>>
>>>
>>>
>>
>> the basic function in LilyPond is given with
>>
>> \include "test.ly"
>> \markup \verbatim-file #"test.ly"
>>
>> now I don't know what you mean with automatically - should it be 
>> attached
>> every time? on a new page, in another (pdf) file?
>>
>> or did you mean something else?
>
> I do think this would do what the user wants, if we did not need to 
> put the filename in explicitly.  Is there any way of getting the 
> filename into a variable?

Actually, I don't think this is what the OP wanted. A pdf file can have 
other files attached (which are not displayed) and even signed for 
authenticity. These files are not included as text, but the PDF viewer 
typically displays a message that other files are attached to the PDF 
file and can be extracted and stored on disk.

Attached is a sample file, created by pdftk (test.pdf is created by 
lilypond, and the test.ly file is attached to it, and everything is 
output as test_attached.pdf):
        pdftk test.pdf attach_files test.ly  output test_attached.pdf

If you open it in acroread (in okular the file name of the attached file 
seems messed up), you'll see that the test.ly file is attached to the 
pdf and can be opened from acroread. You'll probably need to look at the 
tab with the paper clip to list the attached files.

I don't know if ps2pdf supports attaching files to the resulting pdf 
files, though...

Cheers,
Reinhold


PS: While IMSLP.org does not allow upload of source files directly, it 
allows/encourages contributors to attach the source files to the output 
pdf file.

-- 
------------------------------------------------------------------
Reinhold Kainhofer,reinhold@kainhofer.com, http://reinhold.kainhofer.com
  * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
  * http://www.fam.tuwien.ac.at/, DVR: 0005886
  * LilyPond, Music typesetting, http://www.lilypond.org


["test_attached.pdf" (application/pdf)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic