A big problem with filecontents is that if you modify a file that your correspondent already have, filecontents will _not_ override it. Am major problem, if you ask me.
Aah.. I did some googling and looks like the problem above has been solved already. Check out the filecontents package which is meant to take care of exactly this non-overwriting behavior:
ftp://ftp.tex.ac.uk/pub/tex/macros/latex/contrib/filecontents
From the README:
"The filecontents package removes these limitations, letting you overwrite existing files and letting you use filecontents/filecontents* anywhere"
In addition, implementing this feature request is probably a lot simpler cos I just found this script called artex which is supposed to do exactly what I'd requested.. check out:
ftp://ftp.tex.ac.uk/tex-archive/support/artex
From the README: "If non-standard files are identified, ArTeX creates filecontents or filecontents* environments for them and adds these environments to the input document."
Now, do these two packages mean that I can define a custom export in LyX and get what I want? Would still be nice to have this as a default export feature though if more people have the same need...
Thanks, nirmal
