On Mon, Oct 21, 2002 at 11:15:23PM +0100, John Levon wrote:
> I need to run a filter that takes in .dvi and outputs .dvi
> and it needs to run based on a bufferparam and really needs to run
> automatically on "View->DVI". Can some converters bod give me a hint
> about the best approach ? I'm not really familiar with that code (Yet),
> but it doesn't seem to be able to handle this easily.
What are you trying to do exactly?
>
> I could define two convertors .tex -> dvi_p, .dvi_p ->.dvi, but how
> would I get this to work properly when the post filter is not found ?
You could define the .dvi_p->.dvi converter as a script that look likes
if filter exists
filter <infile> <outfile>
else
mv <infile> <outfile>
Also, you need to define the .tex -> dvi_p converter as a script:
latex <infile>
Rename <basename>.dvi <basename>.dvi_p
Another option, if the filter does not take a lot of processing power, is to
just change the latex->dvi converter to
latex <infile>
if filter existsfilter exists
filter <outfile> tempfile
mv tempfile <outfile>