Georg Baum wrote:
The external template mechanism was designed exactly for this purpose. With an external template the user can define a set of input files, a set of output files, a conversion command that creates the output files from the input files, and the TeX code that should be inserted into the document.
Sweet! I had no idea this existed. Georg, thanks for pointing it out. I'll have a look.
/Paul