Fix for latexTemplate in case %is in a label, name or elementId