Re: [Feature request] attach lilypond code in pdf.
On Fri, Jul 13, 2012 at 09:49:31PM +0200, Marek Klein wrote: 2012/7/9 Colin Hall colingh...@gmail.com On Sun, Jul 08, 2012 at 08:27:41PM +0200, Da Mota Sam 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. Thanks for the suggestion, Samuel. I'm forwarding your suggestion to bug-lilypond, and I'll create an issue tracker so that it is on the work list for the developers. Cheers, Colin. Just for the info: it was added as http://code.google.com/p/lilypond/issues/detail?id=2643 by Colin. Sorry, I missed sending the acknowledgement to the list. Again. Thanks for picking that up, Marek. Cheers, Colin. -- Colin Hall ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: [Feature request] attach lilypond code in pdf.
2012/7/9 Colin Hall colingh...@gmail.com On Sun, Jul 08, 2012 at 08:27:41PM +0200, Da Mota Sam 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. Thanks for the suggestion, Samuel. I'm forwarding your suggestion to bug-lilypond, and I'll create an issue tracker so that it is on the work list for the developers. Cheers, Colin. Just for the info: it was added as http://code.google.com/p/lilypond/issues/detail?id=2643 by Colin. Marek bug squad member ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
-Eluze elu...@gmail.com wrote in message news:34131686.p...@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? Eluze 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? -- Phil Holmes Bug Squad ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: [Feature request] attach lilypond code in pdf.
Le 09/07/2012, Phil Holmes disait : [...] 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? Eluze 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? It might be OK when _one_ score means _one_ file. I see a problem when you deal with a full book and, for instance, have 646 files spread in 53 folders. You should then enclose an archive of the tree. Cheers, Jean-Charles ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
Phil Holmes-2 wrote: 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? Eluze 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? there is a snippet that derives the filename from the command line: http://lsr.dsi.unimi.it/LSR/Item?id=197 File Information but it doesn't work with 2.15.41 and also for 2.14.2 the filename may not have blanks. Eluze -- View this message in context: http://old.nabble.com/Fwd%3A--Feature-request--attach-lilypond-code-in-pdf.-tp34131613p34133679.html Sent from the Gnu - Lilypond - Bugs mailing list archive at Nabble.com. ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
-Eluze elu...@gmail.com writes: Phil Holmes-2 wrote: 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? Eluze 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? there is a snippet that derives the filename from the command line: http://lsr.dsi.unimi.it/LSR/Item?id=197 File Information but it doesn't work with 2.15.41 and also for 2.14.2 the filename may not have blanks. What's wrong with using input-file-name ? This should work for the main input file. If you need more than that, you can likely work with something like #(read-hash-extend #\ (lambda (c p) (port-filename p))) #(display #) This will not work before 2.15.twentyish (when I decided that the terrible error messages for Scheme code were not doing anybody a favor, and made port-filename, port-line, and port-column point to sensible locations). -- David Kastrup ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
On 2012-07-09 10:49, Phil Holmes wrote: -Eluze elu...@gmail.com wrote in message news:34131686.p...@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,reinh...@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 Description: Adobe PDF document ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
Reinhold Kainhofer writes: If you open it in proprietary pdf reader No need for that, evince shows the attachment fine. It would be nice if we could do this directly through GhostScript or a PostScript command. Jan -- Jan Nieuwenhuizen jann...@gnu.org | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
David Kastrup wrote: What's wrong with using input-file-name ? This should work for the main input file. If you need more than that, you can likely work with something like #(read-hash-extend #\ (lambda (c p) (port-filename p))) #(display #) This will not work before 2.15.twentyish (when I decided that the terrible error messages for Scheme code were not doing anybody a favor, and made port-filename, port-line, and port-column point to sensible locations). this only lacks to be mentioned somewhere in the docs! great! - are there other such undocumented variables? Eluze -- View this message in context: http://old.nabble.com/Fwd%3A--Feature-request--attach-lilypond-code-in-pdf.-tp34131613p34134198.html Sent from the Gnu - Lilypond - Bugs mailing list archive at Nabble.com. ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
-Eluze elu...@gmail.com writes: David Kastrup wrote: What's wrong with using input-file-name ? This should work for the main input file. If you need more than that, you can likely work with something like #(read-hash-extend #\ (lambda (c p) (port-filename p))) #(display #) This will not work before 2.15.twentyish (when I decided that the terrible error messages for Scheme code were not doing anybody a favor, and made port-filename, port-line, and port-column point to sensible locations). this only lacks to be mentioned somewhere in the docs! great! - are there other such undocumented variables? The elements of the read-hash-extend thing are all explained in the Guile manual and just work as expected (notwithstanding that this has not always been the case). Using a reader extension seems awkward, but most other stuff is executed at a time when the port is no longer available. Of course, pretty much every music expression (and the resulting stream event) has an 'origin property which you can call ly:input-file-line-char-column or ly:input_both_locations on (both are documented), and every music, scheme or event function has a location parameter carrying the same information. So it is not like one would be all that dependent on getting this info from the Scheme reader. It is not like it would be really hidden. -- David Kastrup ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
On Mon, Jul 9, 2012 at 2:31 PM, Reinhold Kainhofer reinh...@kainhofer.com wrote: -Eluze elu...@gmail.com wrote in message On Sun, Jul 8, 2012 at 8:27 PM, Da Mota Sam da.mota@gmail.com wrote: 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. the basic function in LilyPond is given with \include test.ly \markup \verbatim-file #test.ly Actually, I don't think this is what the OP wanted. Definitely! I'm sure that Samuel meant attaching .ly files to pdf files (like attachments in email), not quoting the source code in markup. I agree that this would be a very useful feature. My source files change even *after* the score was already published, and sometimes i have trouble when i want to recompile and get the old version. Putting them under version control would help, but i don't think it would solve all the problems. Attaching sources to pdfs gives a really nice way to store music. I prefer to keep finished pdfs separately - for greater clarity, easy searching, easy sharing (my friends wouldn't know what to do with all these source files) and because i also have finale-made pdfs to mix with Lily-made ones. The downsides are that i may not have the sources when i need them or that the pdf doesn't match the source anymore - both of these would be solved by having appropriate .ly files attached to the score. They don't take much space and don't get in the way - really cool! cheers, Janek ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Fwd: [Feature request] attach lilypond code in pdf.
Forwarded from the lilypond user list. - Forwarded message from Da Mota Sam da.mota@gmail.com - Date: Sun, 8 Jul 2012 20:27:41 +0200 From: Da Mota Sam da.mota@gmail.com To: lilypond-u...@gnu.org Subject: [Feature request] attach lilypond code in pdf. 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. I think it would be nice to have a lilypond option that attaches the .ly files into the pdf. This way when someone creates a partition and upload it to a website, the code will be uploaded too, thus making it much more easier for any user to possibly modify it. Moreover it will help spreading the use of lilypond. In linux it is easy to do it using pdftk (the command is pdftk input_file.pdf attach_files source_file.ly output output_file.pdf). It may be interesting to automatically call this command just after the pdf generation. Pdftk seems to be also available under windows and mac os. Moreover, if this feature is accepted, it may be interesting to modify the default tagline which says engraved by lilypond version x.y.z to engraved by lilypond version x.y.z with source file attached to increase its visibility. Of course, for musicians who doesn't want to share their lilypond code, this feature should be kept as an option (maybe turned on by default). Best Regards, -- Samuel DA MOTA ___ lilypond-user mailing list lilypond-u...@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user - End forwarded message - -- Colin Hall ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
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! ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
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? Eluze -- View this message in context: http://old.nabble.com/Fwd%3A--Feature-request--attach-lilypond-code-in-pdf.-tp34131613p34131686.html Sent from the Gnu - Lilypond - Bugs mailing list archive at Nabble.com. ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Fwd: [Feature request] attach lilypond code in pdf.
-Eluze elu...@gmail.com writes: 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 Not really. 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? More like changing the copyright line from Typeset by LilyPond version 2.15.42 to Typeset by LilyPond version 2.15.42 from test.ly where clicking on test.ly will extract the original source file to disk, to a location matching click-to-point functionality. If lilypond-invoke-editor is properly adapted, it can offer to unpack such a source file for clicking on click-to-point links when this is not yet done. While it is probably overkill to have a link that downloads and bootstraps a LilyPond installation when not yet there, there is some potential for making things look nicer. -- David Kastrup ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond