def format_latex(self, strng):
<EOL>escape_re = re.compile(r'<STR_LIT>',re.MULTILINE)<EOL>cmd_name_re = re.compile(r'<STR_LIT>' % ESC_MAGIC,<EOL>re.MULTILINE)<EOL>cmd_re = re.compile(r'<STR_LIT>' % ESC_MAGIC,<EOL>re.MULTILINE)<EOL>par_re = re.compile(r'<STR_LIT>',re.MULTILINE)<EOL>newline_re = re.compile(r'<STR_LIT>')<EOL>strng = cmd_name_re.sub(r'<STR_LIT>',<EOL>strng)<EOL>strng = cmd_re.sub(r'<STR_LIT>',strng)<EOL>strng = par_re.sub(r'<STR_LIT>',strng)<EOL>strng = escape_re.sub(r'<STR_LIT>',strng)<EOL>strng = newline_re.sub(r'<STR_LIT>',strng)<EOL>return strng<EOL>
Format a string for latex inclusion.