From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/31190 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: LilyPond module for LilyPond 2.9.x Date: Tue, 3 Oct 2006 23:59:54 +0200 Message-ID: <6faad9f00610031459u632f7ccaq48281b340750d0ce@mail.gmail.com> References: <670FE057-FCF8-45F7-AADC-B1B7C947DFF3@fiee.net> <45198C5C.90703@wxs.nl> <6A5E87EB-EBA4-4590-9E46-20812EB3EB36@fiee.net> <451A2E76.8040409@wxs.nl> <46A8585E-FD51-407F-BF80-542AC670FC23@fiee.net> <2A33D7FE-54BC-4FBC-92E3-C0DD94FF0FE3@fiee.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1159912829 4751 80.91.229.2 (3 Oct 2006 22:00:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Oct 2006 22:00:29 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 04 00:00:27 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1GUsJE-00019N-Qu for gctc-ntg-context-518@m.gmane.org; Wed, 04 Oct 2006 00:00:16 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7936C1FE88; Wed, 4 Oct 2006 00:00:15 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25508-02; Wed, 4 Oct 2006 00:00:07 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9FE861FCF5; Wed, 4 Oct 2006 00:00:07 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id ECD061FCF5 for ; Wed, 4 Oct 2006 00:00:02 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24642-03 for ; Tue, 3 Oct 2006 23:59:57 +0200 (CEST) Original-Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by ronja.ntg.nl (Postfix) with SMTP id 7F9251FCF3 for ; Tue, 3 Oct 2006 23:59:55 +0200 (CEST) Original-Received: by wx-out-0506.google.com with SMTP id s12so2139431wxc for ; Tue, 03 Oct 2006 14:59:54 -0700 (PDT) Original-Received: by 10.90.25.7 with SMTP id 7mr4146986agy; Tue, 03 Oct 2006 14:59:54 -0700 (PDT) Original-Received: by 10.90.25.15 with HTTP; Tue, 3 Oct 2006 14:59:54 -0700 (PDT) Original-To: "mailing list for ConTeXt users" In-Reply-To: Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:31190 Archived-At: On 10/3/06, Henning Hraban Ramm wrote: > 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% > }% 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 system(echo test1-lilypond-1.tmp)...executed. system(epstopdf test1-lilypond-1.eps)...executed. (C:\Programi\MikTeX\tex\context\base\pdfr-ec.tex) figures : figure test1-lilypond-1 can not be found color : mpcmyk color space is supported color : mpspot color space is supported color : system rgb is local activated system(echo test1-lilypond-2.tmp)...executed. system(epstopdf test1-lilypond-2.eps)...executed. Mojca