Added isInDocEnv()
Removed input()
Added bibliography
Ignore exceptions thrown by kpsewhich

(Indicates non-existent files which can be ignored.)
Added graphicx if tcilatex encountered