ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: t-filter for LilyPond enhancements
Date: Sun, 20 Jan 2013 11:57:41 -0500 (EST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1301201127000.2676@nqv-guvaxcnq> (raw)
In-Reply-To: <4707DFCF-783C-439F-B3F0-F80D74943C3F@fiee.net>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1472 bytes --]

On Sun, 20 Jan 2013, Henning Hraban Ramm wrote:

> I'm using t-filter with LilyPond for my songbooklets like this:
>
> -----
>
> \def\readPDFfile#1{\externalfigure[#1]}
>
> \usemodule[filter]
> \defineexternalfilter[lilypond]
> 	[continue=yes,
> 	readcommand=\readPDFfile,
> 	directory=lilytemp/,
> 	output={\externalfilterbasefile.pdf},
> 	filtercommand={lilypond -dbackend=eps -dinclude-eps-fonts -dno-gs-load-fonts -o"lilytemp/\externalfilterbasefile" "\externalfilterinputfile"}]
>
> -----
>
> Now, I'd like my lilypond sections/buffers to have different names than just numbers; I'd prefer some unique IDs or even manually set names to be able to re-order them without the need of re-compiling.
> I.e. if I change the order of songs in my songbook, all LilyPond snippets must get recalculated, even if they didn’t change.

Does

\startlilypond[name=one]
....
\stoplilypond

what you are looking for? (see the docs for how this behaves behind the 
scenes)


> There are some more enhancements that I’d like to implement, e.g. 
> checking the resulting files if there are several pages or using single 
> notelines to let ConTeXt do the page breaking (like lilypond-book does 
> with LaTeX). I guess that would be as simple as replacing my 
> \readPDFfile with some Lua code - can you give me a hint how to do that?

See grph-inc.*. I'll post an example later on how to handle single page 
and multipage pdfs differently.

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2013-01-20 16:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-20 12:15 Henning Hraban Ramm
2013-01-20 16:57 ` Aditya Mahajan [this message]
2013-01-20 20:02   ` Henning Hraban Ramm
2013-01-20 20:19     ` Aditya Mahajan
2013-01-20 20:35       ` Henning Hraban Ramm

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=alpine.DEB.2.02.1301201127000.2676@nqv-guvaxcnq \
    --to=adityam@umich.edu \
    --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).