Dear list, especially Hraban, who had asked for sth like this, I had tried sending this yesterday, but with the pdf output included, it was too big for the list. In any case, please find enclosed a tentative lilypond inclusion file and a sample file. The whole thing basically works (though support for non-pdf versions is currently absent, but should be relatively easy to implement), but I'm sure I've taken a non-ConTeXt-way at more than one place and I have a few problems, most of them lilypond-related. The first three are strictly ConTeXt-related, though: - I can't include blank lines in \startlilypond...\stoplilypond, because in the buffer I will get a \par for that. There is probably some easy way around this, but I haven't found the idiom yet. - Currently, the whole generation only works with shell_escape=t. Is there a way to use the automp mechanism for other external programs, such as lilypond, as well? It would also save quite some time to only typeset each piece of music only once. - How can I detect whether a pdf file contains multiple pages? - I have only tested the system on my Tiger installation. I'd like to know if it works for others, too. - When typesetting a longer block, I'd like to tell lilypond how much space there is left on the first page, to have music break across pages smoothly with the text. - When typesetting a fragment, I'd like to somehow get a proper baseline from lilypond. I have neither found out how to ask if there is more than one line typeset, nor for the baseline (let's say the bottom line of the staff), which obviously depends on the music actually set. The sample file uses an explicit \lower command with a trial-&-error value. I assume that the lilypond TeX backend gives me something that could be useful here, but I haven't analyzed it in detail. regards, Christopher
Christopher Creutzig wrote:
- I can't include blank lines in \startlilypond...\stoplilypond, because in the buffer I will get a \par for that. There is probably some easy way around this, but I haven't found the idiom yet.
redefine par -)
- Currently, the whole generation only works with shell_escape=t. Is there a way to use the automp mechanism for other external programs, such as lilypond, as well? It would also save quite some time to only typeset each piece of music only once.
\startmode[*first] % \v!first \stopmode (or: \doifmode ... )
- How can I detect whether a pdf file contains multiple pages?
\getfiguredimensions[...] % same args as \externalfigure \noffigurepages
- When typesetting a longer block, I'd like to tell lilypond how much space there is left on the first page, to have music break across pages smoothly with the text.
hm, rougly \pagegoal-\pagetotal-\whateverdistanceneeded Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
Christopher Creutzig wrote:
- I can't include blank lines in \startlilypond...\stoplilypond, because in the buffer I will get a \par for that. There is probably some easy way around this, but I haven't found the idiom yet.
redefine par -)
Won't help, since the \par in there is never evaluated. I need to stop it being generated in the first place. I guess I probably should change \catcode`\^^M and \catcode`\^^J before reading the contents.
- Currently, the whole generation only works with shell_escape=t. Is there a way to use the automp mechanism for other external programs, such as lilypond, as well? It would also save quite some time to only typeset each piece of music only once.
\startmode[*first] % \v!first
\stopmode
(or: \doifmode ... )
That would solve the second problem, assuming I insert a counter (which for the first problem would be needed anyway). But is there a way to tell texexec to run this and that between the TeX runs?
- When typesetting a longer block, I'd like to tell lilypond how much space there is left on the first page, to have music break across pages smoothly with the text.
hm, rougly \pagegoal-\pagetotal-\whateverdistanceneeded
I know. This is a problem on the lilypond side: How do I tell that program to leave the first 13.42cm of the first page blank? regards, Christopher
Christopher Creutzig wrote:
Won't help, since the \par in there is never evaluated. I need to stop it being generated in the first place. I guess I probably should change \catcode`\^^M and \catcode`\^^J before reading the contents.
\obeylines \let\obeyedlines\space
That would solve the second problem, assuming I insert a counter (which for the first problem would be needed anyway). But is there a way to tell texexec to run this and that between the TeX runs?
the *first mode is set automatically direct runs: \startmode[*first]% \executesystemcommand{...} \stopmode or between first and second run: \startmode[*first]% \installprogram{.....} \stopmode Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am 2005-09-15 um 11:49 schrieb Christopher Creutzig:
especially Hraban, who had asked for sth like this,
Thank you for your work, I can't participate at the moment, am just too busy. Perhaps document what you did and what's missing at the wiki page: http://wiki.contextgarden.net/LilyPond Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
Hi, I love both lilypond and context. In my last project (thanks to which I substantially started using both in a decent way) I included in metafun code 250 PDFs fragments made by lily. Perfect result. So, I was asking myself: is lily direct inclusion in context so relevant? Why? Just for my curiosity. -a- On 15 Sep 2005, at 16:34, Henning Hraban Ramm wrote:
Am 2005-09-15 um 11:49 schrieb Christopher Creutzig:
especially Hraban, who had asked for sth like this,
Thank you for your work, I can't participate at the moment, am just too busy.
Perhaps document what you did and what's missing at the wiki page: http://wiki.contextgarden.net/LilyPond
Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Andrea Valle Laboratorio multimediale "G. Quazza" Facoltà di Scienze della Formazione Università degli Studi di Torino andrea.valle@unito.it
Am 2005-09-15 um 23:00 schrieb andrea valle:
I love both lilypond and context. In my last project (thanks to which I substantially started using both in a decent way) I included in metafun code 250 PDFs fragments made by lily. Perfect result. So, I was asking myself: is lily direct inclusion in context so relevant? Why? Just for my curiosity.
How did you get your LilyPond fragments? The only way I know would be to cut them from whole PDF pages with Acrobat. But I'm only a newbie (and I don't really feel like learning Scheme). I expect all the nasty work to be done by some script/program, similar to the LilyPond integration with LaTeX. Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
How did you get your LilyPond fragments? The only way I know would be to cut them from whole PDF pages with Acrobat.
Ah, I understand the point. Yes, in my new composition I create a graph connecting some musical fragment (I don't wanna bore yuo too much with these details). In any case, I use Context as general typesetting environment, Metafun as vectorial, scalable, scriptable drawing engine, and lilypond as notation generator. The idea is to produce lily files, to render them, to include them in a metafun drawing, where I can clip and place them opportunely, and to render context files. My program is written in Python. But, it's true, I got involved in the problem of cropping PDFs output by lily (from the a6 format I chose). I solved using externalfigure clip in metafun. I tried Imagemagik: it crops the PDFs but it seems that it rasterizes the image. So, what can one use to crop a pdf? Preview in macosx, as acrobat, does the job, but I'd prefer too to use something from the command line.
But I'm only a newbie (and I don't really feel like learning Scheme). I don't want, too. I'd like to have python :)
Here are two of the resulting scores (not totally finished yet) www.semiotiche.it/andrea/membrana/nodi-I.pdf www.semiotiche.it/andrea/membrana/nodi-II.pdf and one of the context file www.semiotiche.it/andrea/membrana/nodi-I.tex Best -a- PS: ah, thanks to the list, without support I won't be able to draw a line...
andrea valle wrote:
My program is written in Python.
wow, so i'm not the only one..
I don't want, too. I'd like to have python :)
Did you see http://pyx.sourceforge.net/ and http://oedipus.sourceforge.net/py2tex/ luigi
andrea valle wrote:
Here are two of the resulting scores (not totally finished yet) www.semiotiche.it/andrea/membrana/nodi-I.pdf www.semiotiche.it/andrea/membrana/nodi-II.pdf
and one of the context file www.semiotiche.it/andrea/membrana/nodi-I.tex
impressive Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Andrea! Incredibile! Impressionante! Auguri Willi Hans Hagen wrote:
andrea valle wrote:
Here are two of the resulting scores (not totally finished yet) www.semiotiche.it/andrea/membrana/nodi-I.pdf www.semiotiche.it/andrea/membrana/nodi-II.pdf
and one of the context file www.semiotiche.it/andrea/membrana/nodi-I.tex
impressive Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
(thanks to all) I'm very happy and proud of this comments, having started using context two months ago exactly because of this project, and I was not very satisfied with coercing metafun's elegance to work like a no-brain plotter....Another fantastic thing of this context/lily setup is that I went today to the typography with my usb pen and printed my two PDFs -A1 format- in a while. Non problem at all. Now, let's see if my friend pianist will appreciate too... I'm planning to have six pieces. As it seems that it can raise some interest, when I finish all I'll set up a web page and post a link to list. In the meanwhile I keep making context (and lilypond) propaganda. Next seminar in our Multimedia department (http://www.cirma.unito.it/) will be dedicated to this mixed typesetting system (http://www.cirma.unito.it/valle.pdf). Best and thanks to all for supporting context -a- On 16 Sep 2005, at 17:29, Hans Hagen wrote:
andrea valle wrote:
Here are two of the resulting scores (not totally finished yet) www.semiotiche.it/andrea/membrana/nodi-I.pdf www.semiotiche.it/andrea/membrana/nodi-II.pdf
and one of the context file www.semiotiche.it/andrea/membrana/nodi-I.tex
impressive Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Andrea Valle Laboratorio multimediale "G. Quazza" Facoltà di Scienze della Formazione Università degli Studi di Torino andrea.valle@unito.it
andrea valle wrote:
(thanks to all)
I'm very happy and proud of this comments, having started using context two months ago exactly because of this project, and I was not very satisfied with coercing metafun's elegance to work like a no-brain plotter....Another fantastic thing of this context/lily setup is that I went today to the typography with my usb pen and printed my two PDFs -A1 format- in a while. Non problem at all. Now, let's see if my friend pianist will appreciate too...
two suggestions: - write an article on it (taco can tell you more about hwo to publish in the maps; once it's maps ready, publishing in tugboat should be doable as well - ther is context style now); my impression (also from visiting user group meetings) is that there are quite some texies interested in music - do a presentation of this mixed typesetting at the 2006 eurotex meetig g(hungary) and/or tug meeting (marocco); i'm in both programming committees so ... Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi Andrea,
- write an article on it (taco can tell you more about hwo to publish in the maps; once it's maps ready, publishing in tugboat should be doable as well - ther is context style now); my impression (also from visiting user group meetings) is that there are quite some texies interested in music
We would definately welcome an article about this! It doesn't have to be complicated, just explain what you've done and show off the result. Anything ConTeXt-able is fine, the editors (me) can and will do the work of putting your text in the Maps layout. Greetings, Taco (As editor of the Maps).
Hans Hagen wrote:
andrea valle wrote:
Here are two of the resulting scores (not totally finished yet) www.semiotiche.it/andrea/membrana/nodi-I.pdf www.semiotiche.it/andrea/membrana/nodi-II.pdf
and one of the context file www.semiotiche.it/andrea/membrana/nodi-I.tex
impressive
I agree (from the optical point of view), but could you include a short English explanation about which paths may be followed, what their labels mean, if the position of the fragments conveys information, how many instruments are playing at once etc.? I'm afraid I simply don't understand the notation as is. Christopher
Sorry if it seemed exoteric, but my idea was simply to show some typographical results, not to present a composition (an argument surely OT). The idea is that the performer (a pianist, even if notation is generic) choose a starting point, execute the notation in the chosen vertex, choose an edge, wait for the duration indicated in the label on the edge, and executed the reached vertex. Duration is ad libitum. All the compositional parameters change in relation to space position of each vertex. So it's like exploring different sound spaces (in the geographic sense) with specific morphologies. I use a slightly more advanced system typically for electronic composition (here there's a paper in case of interest: www.di.unito.it/~vincenzo/drafts/Valle-Lombardo-CIM03.pdf). This is the general structure, then each piece has different, specific, particularities both in terms of mapping, either in terms of performance instructions (e.g. in nodi-II there's no duration indicated in the vertices, the way one "waits" for the duration of edge label change between the two pieces, etc.). Typically I score out the result of a system run. In this case, I want to experiment with the collaboration of my friend pianist, who is a very good musician in the broadest sense. The pieces are very open in some sense, but in other are very "close". -a- On 17 Sep 2005, at 13:26, Christopher Creutzig wrote:
Hans Hagen wrote:
andrea valle wrote:
Here are two of the resulting scores (not totally finished yet) www.semiotiche.it/andrea/membrana/nodi-I.pdf www.semiotiche.it/andrea/membrana/nodi-II.pdf
and one of the context file www.semiotiche.it/andrea/membrana/nodi-I.tex
impressive
I agree (from the optical point of view), but could you include a short English explanation about which paths may be followed, what their labels mean, if the position of the fragments conveys information, how many instruments are playing at once etc.? I'm afraid I simply don't understand the notation as is.
Christopher _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Andrea Valle Laboratorio multimediale "G. Quazza" Facoltà di Scienze della Formazione Università degli Studi di Torino andrea.valle@unito.it
andrea valle said this at Fri, 16 Sep 2005 16:13:33 +0200:
Here are two of the resulting scores (not totally finished yet) www.semiotiche.it/andrea/membrana/nodi-I.pdf www.semiotiche.it/andrea/membrana/nodi-II.pdf
Wow. Fantastic stuff. Having just returned from the ICMC and ISMIR conferences, it looks very much like it could be a computer's internal model of a piece. This cuts very close to my day job, yet I never would have imagined ConTeXt could enable this for people... -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adam Lindsay wrote:
This cuts very close to my day job, yet I never would have imagined ConTeXt could enable this for people...
wait till you see what a lua enhancec context can do (playing with it now) -) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Friday, September 16, 2005 Hans Hagen wrote:
Adam Lindsay wrote:
This cuts very close to my day job, yet I never would have imagined ConTeXt could enable this for people...
wait till you see what a lua enhancec context can do (playing with it now) -)
Perl, Ruby, Lua ... what next? -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta wrote:
Perl, Ruby, Lua ... what next?
megapost (by Giuseppe Bilotta) lualeph (by Giuseppe Bilotta) i'm told that he will start with that when he finished his thesis -) (btw, could you do your thesis work without megapost? i thought that it was a prerequisite) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Sunday, September 18, 2005 Hans Hagen wrote:
Giuseppe Bilotta wrote:
Perl, Ruby, Lua ... what next?
megapost (by Giuseppe Bilotta) lualeph (by Giuseppe Bilotta)
i'm told that he will start with that when he finished his thesis -)
Who's this nutcase? ;) Seriously, as long as it keeps being hobbistic, I'd better stick to a single project at a time :)
(btw, could you do your thesis work without megapost? i thought that it was a prerequisite)
No, my thesis only deals with the theory behind Kinch's method to convert fonts, and how it can be improved. Megapost would only fit the scene because it could be possible to implement such conversion directly in it, whereas metapost doesn't have enough precision. -- Giuseppe "Oblomov" Bilotta
andrea valle wrote:
So, I was asking myself: is lily direct inclusion in context so relevant? Why?
No, in the same way there is really no absolute need to have MetaPost code directly in you TeX files. Having them in external files, compiling from a Makefile and just using \externalfigure[gfx-1.pdf] works perfectly. It's just that some people (often including me) prefer to have their sources in one place, especially when using small snippets. Oh, and of course including the sources in the TeX files allows things such as passing parameters (not yet done for lilypond), such as the proper-page-break thing I mentioned. Christopher
No, in the same way there is really no absolute need to have MetaPost code directly in you TeX files.
It's just that some people (often including me) prefer to have their sources in one place, especially when using small snippets.
I completely agree. It would avoid me writing lily files and render them, and then import them in context, having all this sparse stuff. I was just tinkering about developing time.
Oh, and of course including the sources in the TeX files allows things such as passing parameters (not yet done for lilypond), such as the proper-page-break thing I mentioned.
True, I missed the point Thanks Best -a-
Henning Hraban Ramm wrote:
Perhaps document what you did and what's missing at the wiki page: http://wiki.contextgarden.net/LilyPond
Patrick, assuming I will find time to improve a few tidbits every now and then, what would be the best way to have an up-to-date module in the garden? Just send you an URL to mirror? Christopher
Hello Christopher and others,
Patrick, assuming I will find time to improve a few tidbits every now and then, what would be the best way to have an up-to-date module in the garden? Just send you an URL to mirror?
Either that or send me an email with the package (if it is not too large (< 1meg), I am still on a dial-up low bandwidth connection). Patrick -- ConTeXt wiki and more: http://contextgarden.net
Thanks a lot for the module! I didn't manage yet to make it work properly, but it's promising. Just a note: calling "epstopdf" is pretty optimistic, I'm affraid that even on linux systems this command is not always present or at least it has some other name. I don't know about other versions, but under windows lilypond has gs "built in" and can already output pdf files (besides the fact that they can perhaps already be included in ConTeXt out-of-the-box, I don't know). If I delete "-b eps --ps" in Christopher's module, it complains about "The postscript backend does not support the 'classic' framework", whatever this means. I have no experiences with lilypond, but this message does not occur when processing other lilypond files. Mojca
Mojca Miklavec wrote:
Thanks a lot for the module! I didn't manage yet to make it work properly, but it's promising.
Just a note: calling "epstopdf" is pretty optimistic, I'm affraid that even on linux systems this command is not always present or at least it has some other name. I don't know about other versions, but under windows lilypond has gs "built in" and can already output pdf files (besides the fact that they can perhaps already be included in ConTeXt out-of-the-box, I don't know). If I delete "-b eps --ps" in Christopher's module, it complains about "The postscript backend does not support the 'classic' framework", whatever this means. I have no experiences with lilypond, but this message does not occur when processing other lilypond files.
context ships with pdftops (or better use the the updatex version, called newpstopdf) probably few know, but texutil has functionality similar to epstopdf (which is a trick sebastian rahtz posted to the pdftex list in the early days of pdftex); the texutil variant does a few more things (like removing interfering crap in the ps file) and the stand alone ruby variants know a few more tricks. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Mojca Miklavec wrote:
Just a note: calling "epstopdf" is pretty optimistic, I'm affraid that
Ok, I changed that to "texutil --figures --epstopdf". BTW, Hans, the log messages are flaky, the name of the pdf file is reported incorrectly: option : convert EPS to PDF eps file : lily-test-lilypond.eps pdf file : lily-test-lilypond.eps
it has some other name. I don't know about other versions, but under windows lilypond has gs "built in" and can already output pdf files
Yes, but those are not suitable for inclusion because they are full-size A4 pages. I tried using them first, but couldn't get the information needed to properly clip the A4 pages to the required part.
out-of-the-box, I don't know). If I delete "-b eps --ps" in Christopher's module, it complains about "The postscript backend does not support the 'classic' framework", whatever this means. I have no
It means you can't include the header I copied from lilypond-book to get cropped output with the default backend. Christopher
Christopher Creutzig wrote:
Yes, but those are not suitable for inclusion because they are full-size A4 pages. I tried using them first, but couldn't get the information needed to properly clip the A4 pages to the required part.
It means you can't include the header I copied from lilypond-book to get cropped output with the default backend.
I just found what I was looking for for quite some time: http://www.tug.org/tex-archive/support/pdfcrop/ I may be wrong, but I guess that the code doesn't do much more than calling ghostscript with -sDEVICE=bbox, parsing the data and cropping the page according to the information provided by ghostscript. I guess that this could be integrated into scripts in ConTeXt in quite an elegant way. Before I downloaded the pdfcrop script mentioned above, I was dreaming about being able to say something like texexec --pdf --crop filename.tex (or even texexec --png --transparent --r200 filename.tex) for quite some time. If cropping support would be built into ConTeXt, you wouldn't need to ask lilypond for cropping, but ConTeXt scripts could do that for you. (In the worst case you can still use the script mentioned above.) Mojca And another said information (for windows users only): if you want to call lilypond from command line, you have to call it with the whole path, ie: C:/prog/lilypond/usr/bin/lilypond. Developers don't know how to fix that, so the one who needs to use lilypond under windows has to modify path to lilypond in the module by hand. I guess there's no trivial solution to find where a certain executable is residing (I have "which.exe", but this is way too complicated/not worth the effort.)
Mojca Miklavec wrote:
Christopher Creutzig wrote:
Yes, but those are not suitable for inclusion because they are full-size A4 pages. I tried using them first, but couldn't get the information needed to properly clip the A4 pages to the required part.
It means you can't include the header I copied from lilypond-book to get cropped output with the default backend.
I just found what I was looking for for quite some time: http://www.tug.org/tex-archive/support/pdfcrop/
I may be wrong, but I guess that the code doesn't do much more than calling ghostscript with -sDEVICE=bbox, parsing the data and cropping the page according to the information provided by ghostscript. I guess that this could be integrated into scripts in ConTeXt in quite an elegant way. Before I downloaded the pdfcrop script mentioned above, I was dreaming about being able to say something like texexec --pdf --crop filename.tex (or even texexec --png --transparent --r200 filename.tex) for quite some time.
newpstopdf --method=crop yourfile.ps (raw crop bounded) it also supports svg to pdf conversion, downsampling, subpaths etc (see earlier mail about the manual on manipulations on how this can be done from within context -) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen wrote:
newpstopdf --method=crop yourfile.ps
(raw crop bounded)
How can I crop a PDF document with it? I can do pdf2ps first ... but then?
it also supports svg to pdf conversion, downsampling, subpaths etc
(see earlier mail about the manual on manipulations on how this can be done from within context -)
xmanipulate.pdf? I saw it, but I'm not quite sure that I understood how to apply it. Can I do something like: \externalfigure[myhugedocument.pdf][page=42,conversion=crop]? Thank you, Mojca
Mojca Miklavec wrote:
Hans Hagen wrote:
newpstopdf --method=crop yourfile.ps
(raw crop bounded)
just try it -) --method=crop --method=bounded --method=raw
How can I crop a PDF document with it? I can do pdf2ps first ... but then?
it also supports svg to pdf conversion, downsampling, subpaths etc
(see earlier mail about the manual on manipulations on how this can be done from within context -)
xmanipulate.pdf? I saw it, but I'm not quite sure that I understood how to apply it.
Can I do something like: \externalfigure[myhugedocument.pdf][page=42,conversion=crop]?
indeed, if you make a rlx file that defines the operation Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Mojca Miklavec wrote:
Christopher Creutzig wrote:
Yes, but those are not suitable for inclusion because they are full-size A4 pages. I tried using them first, but couldn't get the information needed to properly clip the A4 pages to the required part.
I just found what I was looking for for quite some time: http://www.tug.org/tex-archive/support/pdfcrop/
Can you ask it to ignore the text line at the bottom of the lilypond-generated page? (It may be possible to ask lilypond not to write that line, but I'm not sure.)
If cropping support would be built into ConTeXt, you wouldn't need to ask lilypond for cropping, but ConTeXt scripts could do that for you.
Sure, but what would it gain? lilypond first generates ps anyway. Both the script you mention and any cropping texutil/ctxtools/whatever is doing probably requires a gs installation anyway. I don't think lilypond creates pdf of better quality than texutil does from the eps, either. So, would this way save or gain anything? (Besides, I still have the hope that I could somehow ask lilypond to tell me some sort of baseline, for inline material. I don't expect that to work well with its pdf output.)
And another said information (for windows users only): if you want to call lilypond from command line, you have to call it with the whole path, ie: C:/prog/lilypond/usr/bin/lilypond. Developers don't know how
So, I should include a path to the yet-to-write \setuplilypond, right?
modify path to lilypond in the module by hand. I guess there's no trivial solution to find where a certain executable is residing (I have "which.exe", but this is way too complicated/not worth the effort.)
There should be no need to, that's what we have %PATH% for. You certainly could add c:/prog/lilypond/usr/bin/ to this environment variable. I'd happily include the default installation path as the default for the setup mentioned above – is the one you gave the default? Is this path mentioned anywhere in either the output of “set” in a cmd box or (second best) the registry? Christopher
Christopher Creutzig wrote:
ther. So, would this way save or gain anything? (Besides, I still have the hope that I could somehow ask lilypond to tell me some sort of baseline, for inline material. I don't expect that to work well with its pdf output.)
why not ask the author of lilipond? sometimes the boundingbox reflects this (negative y values coul dindicate a depth) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (11)
-
Adam Lindsay
-
andrea valle
-
Christopher Creutzig
-
Giuseppe Bilotta
-
Hans Hagen
-
Henning Hraban Ramm
-
luigi.scarso
-
Mojca Miklavec
-
Patrick Gundlach
-
Taco Hoekwater
-
Willi Egger