Out of sight, out of mind

The filter module clutters the current directory with temporary files. Normally I do not notice these files because I have set my shell (zsh) and my editor (vim) to ignore these files. Still, I thought that it will be better if the module itself writes the files in a different directory. That is now possible with the latest version of the module. To set the output directory, just use


and all the files will be created in output/ directory. The output directory can also be set on a per filter basis:


The directory has to be a path relative to the directory from where ConTeXt is run (and not the directory where the files are stored). I thought about supporting absolute paths but, in the end, that was too much trouble to do that reliably (read and write permission in texmf.cnf, strange defaults for \ReadFile macro, … I won’t bore you with the details). I did go out of my way to tell the user that absolute paths are not supported. If you try to use absolute paths you will get an error message

t-filter        : Fatal Error: Cannot use absolute path /tmp/ as directory

So, if you use the filter module and are a cleanliness freak, set the directory option.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s