From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Re: LilyPond module for LilyPond 2.9.x
Date: Tue, 3 Oct 2006 23:59:54 +0200 [thread overview]
Message-ID: <6faad9f00610031459u632f7ccaq48281b340750d0ce@mail.gmail.com> (raw)
In-Reply-To: <B08A725B-E76B-45A4-8115-85F76E889CAA@fiee.net>
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
<test1-lilypond-1.tmp>
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
<test1-lilypond-2.tmp>
system(echo test1-lilypond-2.tmp)...executed.
system(epstopdf test1-lilypond-2.eps)...executed.
Mojca
next prev parent reply other threads:[~2006-10-03 21:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-26 18:34 Henning Hraban Ramm
2006-09-26 20:12 ` Henning Hraban Ramm
2006-09-26 20:23 ` Hans Hagen
2006-09-26 20:52 ` Henning Hraban Ramm
2006-09-27 7:55 ` Hans Hagen
2006-09-27 20:26 ` Henning Hraban Ramm
2006-09-27 22:22 ` Henning Hraban Ramm
2006-10-03 21:37 ` Henning Hraban Ramm
2006-10-03 21:59 ` Mojca Miklavec [this message]
2006-10-04 0:18 ` Henning Hraban Ramm
2006-09-26 21:41 ` Willi Egger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6faad9f00610031459u632f7ccaq48281b340750d0ce@mail.gmail.com \
--to=mojca.miklavec.lists@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).