updated latexTemplate to support keySequence