Added functions to write latex images of all database questions to a tex file