Am 2011-01-27 um 20:08 schrieb Aditya Mahajan:

On a unrelated note, I have been thinking if I can extend the filter module to take care of features provided by lilypond and gnuplot modules. IIUC, in both these modules, the input is transformed before being written to an output file, then an external filter is run and the output is read back again. If we restrict ourselves to MkIV, then the transforming the input can be done in a lua function; the filter module already takes care of the rest of the book-keeping.

Do you think that it makes sense to have such a feature? Then you could just define the gnuplot module as:

\usemodule[filter]

\defineexternalfilter[GNUPLOT]
  [filter={gnuplot --appropriate options},
   conitnue=yes,
   transformation=thirddata.GNUPLOT.transformation,
  ]

where thirddata.GNUPLOT.transformation is a lua function that does all the fancy processing.

What do you think?

I already replaced the LilyPond module by a filter setup, see
http://wiki.contextgarden.net/LilyPond

It doesn't work completely the same, but good enough.
And since every user has different needs, the filter approach is more flexible and thus better than a bunch of hardcoded setup options.


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___________________________________________________________________________________
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 via email to