added cmake flag USE_LATEX