On Thu, Jan 27, 2011 at 20:08, Aditya Mahajan wrote:
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
It is not really transformed, at least not in the case of gnuplot. At
the moment it is composed out of three parts (so it should be easier
to handle):
a) set term <nameofterminal> <options>; set output
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, ]
What exactly would the transformation do? Append the first line (set terminal etc.)? Other functionality of current module includes features such as \setupGNUPLOTterminal[context][width=10cm,height=7cm,dashed=no] but that is not part of your work. Mojca