Re: my favorite bug :-)
Carl Sorensen-3 wrote On 5/4/15 1:35 AM, ArnoldTheresius lt; Arnold.Wendl@ gt; wrote: 2. the PS file, because it's used for another postprocessing: I generate a booklet layout PDF from it (this PDF uses the double sheet size, e.g. A3) How do you do this? This is something I'm very interested in, but I've been doing it from the generated PDF, rather than from the PS. This has the effect of messing up the margins a bit, so I'd like to try the PS to PDF conversion. Thanks, Carl ___ lilypond-user mailing list lilypond-user@ https://lists.gnu.org/mailman/listinfo/lilypond-user I did it by an own C program (which finally calls GS for the conversion of my intermediate PS file into a PDF, too) - because I've done similar things in the past and I did not have any other tool available. Moreover, I did some checks on my computer. It did always compile my lines.ly into lines.pdf - on commandline with 'file name only' and with 'relative path into a subfolder'. I'm currious, what's the command line lilypond tries to generate the PDF? (You'll see it close to the end if you turn on the debugging output). ArnoldTheresius -- View this message in context: http://lilypond.1069038.n5.nabble.com/my-favorite-bug-tp175778p176106.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
Masamichi Hosoda wrote ... However, I think that the intermediate file should be temporary by mkstemp etc. If lilypond uses mkstemp generated temporary file, this ghostscript problem will not occur. ___ lilypond-user mailing list lilypond-user@ https://lists.gnu.org/mailman/listinfo/lilypond-user Well, I often explicitly want both files to be created during one compilation: 1. the 'page by page' PDF, with point-and-click-links (usually A4 sheet size) 2. the PS file, because it's used for another postprocessing: I generate a booklet layout PDF from it (this PDF uses the double sheet size, e.g. A3) Therfore, if someone explicitly want's the keep the intermediate PS file, it shall not be using a temporary file name. Moreover, often I generate a third PDF, too - one just like the first PDF, but the textedit links removed. I implemented this by a patch to scm/backend-library.scm [LSR 992, not approved jet]. I could look how to convert the file name from relative to absolute path there in the procedure postscript-pdf, but the same has to be done for all other final conversion which use an intermediate postcript file, too. ArnoldTheresius -- View this message in context: http://lilypond.1069038.n5.nabble.com/my-favorite-bug-tp175778p176024.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On 5/4/15 1:35 AM, ArnoldTheresius arnold.we...@siemens.com wrote: 2. the PS file, because it's used for another postprocessing: I generate a booklet layout PDF from it (this PDF uses the double sheet size, e.g. A3) How do you do this? This is something I'm very interested in, but I've been doing it from the generated PDF, rather than from the PS. This has the effect of messing up the margins a bit, so I'd like to try the PS to PDF conversion. Thanks, Carl ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On 2015-05-04 15:40, Carl Sorensen wrote: On 5/4/15 1:35 AM, ArnoldTheresius arnold.we...@siemens.com wrote: 2. the PS file, because it's used for another postprocessing: I generate a booklet layout PDF from it (this PDF uses the double sheet size, e.g. A3) How do you do this? This is something I'm very interested in, but I've been doing it from the generated PDF, rather than from the PS. This has the effect of messing up the margins a bit, so I'd like to try the PS to PDF conversion. Did you try pdfbook (brochure-generation wrapper for pdfjam, which again is a commandline frontend for LaTeX's pdfpages): pdfbook --paper a3paper --noautoscale true -o output-a3.pdf input-a4.pdf Of course, there's a bunch of other options; check `pdfjam -h`. HTH, Alexander ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On Mon, 4 May 2015 01:35:13 -0700 (MST) ArnoldTheresius arnold.we...@siemens.com wrote: 2. the PS file, because it's used for another postprocessing: I generate a booklet layout PDF from it (this PDF uses the double sheet size, e.g. A3) You can do this from the PDF as well. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
Hi, this little (simplified) shell script (I have called it ly2pdf) #!/bin/sh INFILE=$1 OUTFILE=${INFILE%.ly}.pdf lilypond --ps -o $$ $INFILE ps2pdf $$.ps $OUTFILE rm -f $$.ps demonstrates the kind of mechanism that LilyPond needs. (But without needing such a script). It fixes the lines.ly issue, and it fixes accidentally and brutally deleting an already existing .ps file. (With simplified I mean: you can not use any options or multiple files on the commandline with this script. It's just a demo) -- MT ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
Observing all the energy devoted to this critical issue, I have to wonder how many extraordinary symphonies, operas, and cantatas will NOT be written because some folks are too easily distracted by minutia I could live 5 lifetimes, and this issue would never get more than 5 seconds of my time, if I even every encountered it. Where, or where, have I gone wrong :) t. On Sat, May 2, 2015 at 2:14 PM, Martin Tarenskeen m.tarensk...@zonnet.nl wrote: Hi, this little (simplified) shell script (I have called it ly2pdf) #!/bin/sh INFILE=$1 OUTFILE=${INFILE%.ly}.pdf lilypond --ps -o $$ $INFILE ps2pdf $$.ps $OUTFILE rm -f $$.ps demonstrates the kind of mechanism that LilyPond needs. (But without needing such a script). It fixes the lines.ly issue, and it fixes accidentally and brutally deleting an already existing .ps file. (With simplified I mean: you can not use any options or multiple files on the commandline with this script. It's just a demo) -- MT ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- ~ My life is full of mistakes. They're like pebbles that make a good road. ~ Ceramic artist Beatrice Wood, who practiced her art until she was 103. ~ Tom Cloyd, MS MA LMHC (WA) Psychotherapist (psychological trauma, dissociative disorders) Spokane, Washington, U.S.A: (435) 272-3332 t...@tomcloyd.com (email) TomCloyd.com (website) ~ ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
The bug would be fixed if lilypond would make ghostscript use a complete path to the intermediate lines.ps file for the ps to pdf conversion. Does anyone know how to convert from any path (relative and absolute path) to absolute path in scheme (guile) ? When the following command is used, lilypond uses the absolute (complete) path to the intermediate files. $ lilypond -dgui `pwd`/lines.ly It works fine. However, I think that the intermediate file should be temporary by mkstemp etc. If lilypond uses mkstemp generated temporary file, this ghostscript problem will not occur. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
However, I think that the intermediate file should be temporary by mkstemp etc. If lilypond uses mkstemp generated temporary file, this ghostscript problem will not occur. +1 Werner ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On Fri, 1 May 2015, N. Andrew Walsh wrote: Is this a similar bug to that I posted to the bug-list already? Namely, that ghostscript fails entirely (and thus lilypond fails to compile entirely) on recent versions of lilypond? As I said there, I'm using gs 3.19, on a self-compiled version of lilypond-3.19.20. I cannot compile even a simple four-note example, due to errors in the gs-to-pdf conversion (or, at least, some failure within ghostscript itself). Cheers, No I think this thread is about another, long standing, issue. The bug you are talking about is relatively new and more urgent: it should be fixed ASAP. -- MT ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
see my other post in the thread about Fedora: that bug is apparently related to a problem with recent fontconfig (which had wide-ranging consequences and breakages on my gentoo system). Cheers, A On Fri, May 1, 2015 at 7:08 PM, Martin Tarenskeen m.tarensk...@gmail.com wrote: On Fri, 1 May 2015, N. Andrew Walsh wrote: Is this a similar bug to that I posted to the bug-list already? Namely, that ghostscript fails entirely (and thus lilypond fails to compile entirely) on recent versions of lilypond? As I said there, I'm using gs 3.19, on a self-compiled version of lilypond-3.19.20. I cannot compile even a simple four-note example, due to errors in the gs-to-pdf conversion (or, at least, some failure within ghostscript itself). Cheers, No I think this thread is about another, long standing, issue. The bug you are talking about is relatively new and more urgent: it should be fixed ASAP. -- MT ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
The bug would be fixed if lilypond would make ghostscript use a complete path to the intermediate lines.ps file for the ps to pdf conversion. Does anyone know how to convert from any path (relative and absolute path) to absolute path in scheme (guile) ? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
my favorite bug :-)
This issue has been reported in the mailing list some time ago - I think it was David Kastrup who discovered it - but I can't find it anywhere in the buglist or in the docs. Did you know it is not possible/allowed to name a lilypond file align.ly or lines.ly? On my Fedora system I can find all the names that suffer from this bug by typing #ls /usr/share/ghostscript/9.15/lib/*.ps all these filenames (minus .ps) can not be used as lilypond inputfiles (plus .ly) for example create a file lines.ly with a minimal content \version 2.19.19 {c' d' e' f'} and compile ... Fortunately there are no prelude.ps, etude.ps, or sonata.ps in the ghostscript files ;-) -- MT ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On Fri, 1 May 2015, Michael Hendry wrote: On 1 May 2015, at 08:54, Werner LEMBERG w...@gnu.org wrote: for example create a file lines.ly with a minimal content \version 2.19.19 {c' d' e' f'} and compile ... Nice! I wasn't aware that lilypond can put *that* much information into four note symbols :-) Please submit a bug report. Werner I’m feeling left out here, on my Mac! All I get is the first four notes of a C major scale!! Michael Macs are boring LOL :-) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
for example create a file lines.ly with a minimal content \version 2.19.19 {c' d' e' f'} and compile ... I'm trying to narrow down the issue It seems that on some systems (like mine). # gs lines.ps is expanded to something like # gs /usr/share/ghostscript/9.15/lines.ps but # gs /complete/path/to/lines.ps is not. When compiling a lines.ly file, lines.ps is produced as an intermediate file before ghostscript converts this to lines.pdf The bug would be fixed if lilypond would make ghostscript use a complete path to the intermediate lines.ps file for the ps to pdf conversion. -- MT ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
for example create a file lines.ly with a minimal content \version 2.19.19 {c' d' e' f'} and compile ... Nice! I wasn't aware that lilypond can put *that* much information into four note symbols :-) Please submit a bug report. Werner ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On 1 May 2015, at 09:41, Martin Tarenskeen m.tarensk...@zonnet.nl wrote: On Fri, 1 May 2015, Michael Hendry wrote: On 1 May 2015, at 08:54, Werner LEMBERG w...@gnu.org wrote: for example create a file lines.ly with a minimal content \version 2.19.19 {c' d' e' f'} and compile ... Nice! I wasn't aware that lilypond can put *that* much information into four note symbols :-) Please submit a bug report. Werner I’m feeling left out here, on my Mac! All I get is the first four notes of a C major scale!! Michael Macs are boring LOL :-) Well, I could make my day more interesting by looking at it as part of a D Dorian scale - or G Mixolydian… M ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On 1 May 2015, at 08:54, Werner LEMBERG w...@gnu.org wrote: for example create a file lines.ly with a minimal content \version 2.19.19 {c' d' e' f'} and compile ... Nice! I wasn't aware that lilypond can put *that* much information into four note symbols :-) Please submit a bug report. Werner I’m feeling left out here, on my Mac! All I get is the first four notes of a C major scale!! Michael ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
Hi All, 2015-05-01 10:41 GMT+02:00 Martin Tarenskeen m.tarensk...@zonnet.nl: On Fri, 1 May 2015, Michael Hendry wrote: On 1 May 2015, at 08:54, Werner LEMBERG w...@gnu.org wrote: for example create a file lines.ly with a minimal content \version 2.19.19 {c' d' e' f'} and compile ... Nice! I wasn't aware that lilypond can put *that* much information into four note symbols :-) Please submit a bug report. Werner I’m feeling left out here, on my Mac! All I get is the first four notes of a C major scale!! Michael So am I : four notes on Ubuntu 14 and W7 Cheers, Pierre ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On Fri, 1 May 2015, Martin Tarenskeen wrote: The bug would be fixed if lilypond would make ghostscript use a complete path to the intermediate lines.ps file for the ps to pdf conversion. The issue has brought me to another problem: LilyPond by default takes *.ly file as input and produces a *.pdf file as output. $lilypond example.ly --- result: example.pdf In this case, as an intermediate file example.ps is used. This is a problem if a file named example.ps already exists in my working directory. This file is brutally overwritten and deleted when I run lilypond without any warning or option to cancel, nor is a backup copy of the old file made. If the intermediate file would be given a unique, not already existing, temporary filename, not only this issue would be solved but also the original lines.ly - lines.ps - lines.pdf issue that started this thread would not be a problem anymore. I'm not a (LilyPond) developer but does it makes sense what I am suggesting? -- MT ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On Fri, 1 May 2015 12:48:52 +0200 (CEST) Martin Tarenskeen m.tarensk...@zonnet.nl wrote: In this case, as an intermediate file example.ps is used. This is a problem if a file named example.ps already exists in my working directory. This file is brutally overwritten and deleted when I run lilypond without any warning or option to cancel, nor is a backup copy of the old file made. Exactly the behaviour that I want. When I work on manuscripts the .pdf (as well as the .midi) are objects. The .ly is the only source. Just like compiling .c files, I don't want a warning every time it is going to overwrite a .o file. If the intermediate file would be given a unique, not already existing, temporary filename, not only this issue would be solved but Solved for some, problem for others. I don't want to have to guess what my final manuscript is named. If I start with example.ly I know that example.pdf is my target. Scripts can deal with that easily. I use make for my charts. Having to deal with guessing output file names would be incredibly tricky if possible at all. also the original lines.ly - lines.ps - lines.pdf issue that started this thread would not be a problem anymore. Different issue. -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves http://www.druid.net/darcy/| and a sheep voting on +1 416 788 2246 (DoD#0082)(eNTP) | what's for dinner. IM: da...@vex.net, VoIP: sip:da...@druid.net ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On 01.05.2015 (14:16), Werner LEMBERG wrote: For the curious people, here's `lines.pdf' if ghostscript erronously processes its own `lines.ps' demo file. Pretty! Have you tried to play it? e -- To be a kind of moral Unix, he touched the hem of Nature's shift. -- Shelley ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
In this case, as an intermediate file example.ps is used. This is a problem if a file named example.ps already exists in my working directory. This file is brutally overwritten and deleted when I run lilypond without any warning or option to cancel, nor is a backup copy of the old file made. Exactly the behaviour that I want. Certainly not. When I work on manuscripts the .pdf (as well as the .midi) are objects. The .ly is the only source. Just like compiling .c files, I don't want a warning every time it is going to overwrite a .o file. There is a big difference: If you compile a .c file, the .o files stays by default; the compiler doesn't remove it. However, lilypond, if called with option `--pdf' (which is the default), *does* remove the intermediate .ps file! If the intermediate file would be given a unique, not already existing, temporary filename, not only this issue would be solved but Solved for some, problem for others. I don't want to have to guess what my final manuscript is named. If I start with example.ly I know that example.pdf is my target. Scripts can deal with that easily. Perhaps a misunderstanding: If I say lilypond --pdf foo.ly I get `foo.pdf', no question. If I say lilypond --os foo.ly I get `foo.ps'. However, the former call creates an intermediate file `foo.ps' that gets deleted eventually by lilypond itself. And this is bad. also the original lines.ly - lines.ps - lines.pdf issue that started this thread would not be a problem anymore. Different issue. No, not at all. Werner ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On Fri, 1 May 2015 08:28:17 -0400 D'Arcy J.M. Cain da...@druid.net wrote: If the intermediate file would be given a unique, not already existing, temporary filename, not only this issue would be solved but Solved for some, problem for others. I don't want to have to guess what my final manuscript is named. If I start with example.ly I know that example.pdf is my target. Scripts can deal with that easily. Only the intermediate files (the ones you shouldn't have to know and worry about) get unique, generated file names. Your desired output file names will be unaffected by the proposed change. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On Fri, 1 May 2015 11:36:23 +0200 Pierre Perol-Schneider pierre.schneider.pa...@gmail.com wrote: So am I : four notes on Ubuntu 14 and W7 It depends on whether your GhostScript looks in the current directory first. Lily should do PDF. Period. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
If the intermediate file would be given a unique, not already existing, temporary filename, not only this issue would be solved but also the original lines.ly - lines.ps - lines.pdf issue that started this thread would not be a problem anymore. I'm not a (LilyPond) developer but does it makes sense what I am suggesting? Yes, it does. As soon as your bug report gets added to the tracker, please add this your comment. Werner ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On Fri, 1 May 2015 09:47:25 +0200 (CEST) Martin Tarenskeen m.tarensk...@zonnet.nl wrote: Did you know it is not possible/allowed to name a lilypond file align.ly or lines.ly? Yes. It is one of the reasons I keep saying that LilyPond should eliminate PostScript (and hence GhostScript) and generate PDF directly. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
Lily should do PDF. Period. Right. However, noone is going to implement this right now, so we have to follow the second-best route, this is, making the creation of the intermediate PS file work correctly. Werner ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
Nice! I wasn't aware that lilypond can put *that* much information into four note symbols :-) I’m feeling left out here, on my Mac! All I get is the first four notes of a C major scale!! For the curious people, here's `lines.pdf' if ghostscript erronously processes its own `lines.ps' demo file. Werner lines.pdf Description: Adobe PDF document ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
Is this a similar bug to that I posted to the bug-list already? Namely, that ghostscript fails entirely (and thus lilypond fails to compile entirely) on recent versions of lilypond? As I said there, I'm using gs 3.19, on a self-compiled version of lilypond-3.19.20. I cannot compile even a simple four-note example, due to errors in the gs-to-pdf conversion (or, at least, some failure within ghostscript itself). Cheers, A On Fri, May 1, 2015 at 2:42 PM, Johan Vromans jvrom...@squirrel.nl wrote: On Fri, 1 May 2015 08:28:17 -0400 D'Arcy J.M. Cain da...@druid.net wrote: If the intermediate file would be given a unique, not already existing, temporary filename, not only this issue would be solved but Solved for some, problem for others. I don't want to have to guess what my final manuscript is named. If I start with example.ly I know that example.pdf is my target. Scripts can deal with that easily. Only the intermediate files (the ones you shouldn't have to know and worry about) get unique, generated file names. Your desired output file names will be unaffected by the proposed change. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: my favorite bug :-)
On Fri, 1 May 2015 15:20:19 +0200 N. Andrew Walsh n.andrew.wa...@gmail.com wrote: Is this a similar bug to that I posted to the bug-list already? Namely, that ghostscript fails entirely (and thus lilypond fails to compile entirely) on recent versions of lilypond? As I said there, I'm using gs 3.19, on a self-compiled version of lilypond-3.19.20. I cannot compile even a simple four-note example, due to errors in the gs-to-pdf conversion (or, at least, some failure within ghostscript itself). Insofar that depending on a very complex (and often changing) external software package will always be critical. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user