Yeah, I finally got it working with recent versions of LilyPond! (The most important change was from "linewidth" to "line-width", and I overlooked that far too long...) The module still has lots of issues (e.g. paths for external command like lilypond are hardcoded), but it does what I want it to do. ;-) Could someone please exchange the module in the garden? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
Am 2006-09-26 um 20:34 schrieb Henning Hraban Ramm:
Yeah, I finally got it working with recent versions of LilyPond!
No, it doesn't. :-( And it's strange: the external command for lilypond gets called, but not that for epstopdf: % I tried different methods to convert the LilyPond EPS to PDF: \def\LP{/usr/local/bin/lilypond -b eps -f eps -dno-gs-load-fonts - dinclude-eps-fonts } %\def\TU{/usr/local/teTeX/bin/powerpc-apple-darwin-current/texutil } \def\TU{perl /usr/local/teTeX/share/texmf.local/scripts/context/perl/ texutil.pl } %\def\PDF{/usr/local/teTeX/bin/powerpc-apple-darwin-current/epstopdf } \def\PDF{\TU --figures --epstopdf } % --figures not yet in Ruby version \ifeof18 \installprogram{\LP \bufferprefix lilypond-\the\lily!figures.tmp}% \doif\jobsuffix{pdf}{% \installprogram{\PDF \bufferprefix lilypond-\the\lily! figures.eps}% }% \else \executesystemcommand{\LP \bufferprefix lilypond-\the\lily! figures.tmp}% \doif\jobsuffix{pdf}{% \executesystemcommand{\PDF \bufferprefix lilypond-\the\lily! figures.eps}% }% \fi I thought it would work, because I already had a PDF of my score EPS from a previous test. If I call one of the above epstopdf commands manually, it works, i.e. the notes appear in my PDF after the next texexec run. Somewhere in the output it says "system commands are disabled" - but the LilyPond call works, and write18 is enabled in my texexec.ini Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
Henning Hraban Ramm wrote:
use texmfstart! texmfstart whateverscript whateverargs will free you from adding the path lilypond -b eps -f eps -dno-gs-load-fonts -dinclude-eps-fonts or texmfstart bin:lilypond .... conversion to pdf: texmfstart pdftops somefile.eps if may be worth using the -ifchanged cum suis features so that you don't get more runs than needed 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 2006-09-26 um 22:23 schrieb Hans Hagen:
Thank you very much, that works! Now I have: \def\LP{texmfstart --exec bin:lilypond -b eps -dno-gs-load-fonts - dinclude-eps-fonts } \def\PDF{texmfstart --ifchanged pstopdf } with \executesystemcommand or \installprogram If I add --ifchanged to the lilypond call, it never does anything; without it's called twice (like before, I couldn't find out why). Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
Am 2006-09-27 um 09:55 schrieb Hans Hagen:
Ah, great! Here's the new version again (Willi, please try this, no need for patching any more!). I also updated the wiki: http://wiki.contextgarden.net/LilyPond Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
Aaargh! It still doesn't work right; I should have tested with more than one LilyPond snippet. \lily!figures is the "image" counter; if I use it in the definition of the command, it stays 1. If I use it like below, I get "! Use of \LP doesn't match its definition." --- code --- \def\LP#1{texmfstart --exec bin:lilypond -b eps -dno-gs-load-fonts - dinclude-eps-fonts \bufferprefix lilypond-#1.tmp} \def\PDF#1{texmfstart --ifchanged=\bufferprefix lilypond-#1.eps pstopdf \bufferprefix lilypond-#1.eps} \ifeof18 \installprogram{\LP{\the\lily!figures}}% \doif\jobsuffix{pdf}{% \installprogram{\PDF{\the\lily!figures}}% }% \else \executesystemcommand{\LP{\the\lily!figures}}% \doif\jobsuffix{pdf}{% \executesystemcommand{\PDF{\the\lily!figures}}% }% \fi --- error --- ! Use of \LP doesn't match its definition. <write> e p {\LP { \the \lily!figures }} <inserted text> }\endwrite \installprogram ...mmediatewriteutility {e p {#1}} \dodostartlilypond ... {\LP {\the \lily!figures }} \doif \jobsuffix {pdf}{\in... l.71 \stoplilypond --- end --- Maybe the problem has nothing to do with this section. Would you please have a look at the file I posted before? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
Hello again, I'm still stuck with the counter problem, unfortunately I got no response... ConTeXts writes out all the LilyPond pieces as "myfile-lilypond- #.tmp", sequential numbered. Then it should run LilyPond and epstopdf on the snippets, but runs them always only on no.1 I.e. the counter doesn't behave like it should. Why? I think, these are the regarding code snippets (sorry, can't think of a minimal example for I don't understand the code by Christopher): \unprotect \def\??lily{lilypond-} %... \newcount\lily!figures %... \long\def\dodostartlilypond[#1]#2\stoplilypond{% \egroup% from \dostartlilypond \bgroup% %... \global\advance\lily!figures\plusone \startmode[*\v!first]% \def\obeyedlines{\string^^J}% \convertargument#2\to\ascii \expanded{% \setbuffer[lilypond-\the\lily!figures]% %>> here it works, all buffers are numbered % ... \ascii% \ifundefined{\??lily fragment}\else\lily!fragmentsuffix\fi }% expanded \endbuffer% \def\LP{texmfstart --exec bin:lilypond -b eps -dno-gs-load-fonts - dinclude-eps-fonts } \def\PDF{texmfstart --ifchanged=} %>> here the counter is always 1 \ifeof18 \installprogram{\LP\bufferprefix lilypond-\the\lily!figures.tmp}% %>> can someone explain this "installprogram"? \doif\jobsuffix{pdf}{% \installprogram{\PDF\bufferprefix lilypond-\the\lily! figures.eps pstopdf \bufferprefix lilypond-\the\lily!figures.eps}% }% \else \executesystemcommand{\LP\bufferprefix lilypond-\the\lily! figures.tmp}% \doif\jobsuffix{pdf}{% \executesystemcommand{\PDF\bufferprefix lilypond-\the\lily! figures.eps pstopdf \bufferprefix lilypond-\the\lily!figures.eps}% }% \fi \stopmode% only first run \doifelse\jobsuffix{pdf} {\edef\lily!img{\bufferprefix lilypond-\the\lily!figures.pdf}}% {\edef\lily!img{\bufferprefix lilypond-\the\lily!figures.eps}}% \ifvmode \getfiguredimensions[\bufferprefix lilypond-\the\lily! figures.pdf]% %>> here it works again, image no.# is not found (besides no.1) \leavevmode% \newdimen\FigWidth \FigWidth=\figurewidth \ifdim\FigWidth>\localhsize \!!dimena=\localhsize \advance\!!dimena by-\FigWidth \noindent\hskip\!!dimena \fi \fi \externalfigure[\lily!img]% \egroup% }% Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://contextgarden.net http://www.cacert.org (I'm an assurer)
On 10/3/06, Henning Hraban Ramm wrote:
I cannot test since lilypond is not working properly on my computer,
but I get the proper numbers.
Here's an excerpt from the log file (I changed lilypond to echo):
systems : begin file test1 at line 2
Am 2006-10-03 um 23:59 schrieb Mojca Miklavec:
I just updated my whole installation, but it's still the same:
structure : begin of sectionblock bodymatter
systems : begin file c_weihgeist at line 32
(./c_weihgeist.tex
Titel : - Kom|m| nun|,| weihnachtlicher Geis|t.|
Hi Hraban! This is great! Recently I was trying Lilypond again and thought, that this music-typesetting environment should be used within ConTeXt. - Your module worked, after adapting the three path-defs under Windows! Thanks Hraban and Chritopher! Willi Henning Hraban Ramm wrote:
participants (4)
-
Hans Hagen
-
Henning Hraban Ramm
-
Mojca Miklavec
-
Willi Egger