Improved interface and docs for tex gen.