How do I sanitize LaTeX input?

Posted by Conley Owens on Stack Overflow See other posts from Stack Overflow or by Conley Owens
Published on 2010-04-13T05:17:51Z Indexed on 2010/04/13 5:23 UTC
Read the original article Hit count: 435

Filed under:
|
|

I'd like to take user input (sometimes this will be large paragraphs) and generate a LaTeX document. I'm considering a couple of simple regular expressions that replaces all instances of "\" with "\textbackslash " and all instances of "{" or "}" with "\}" or "\{".

I doubt this is sufficient. What else do I need to do? Note: In case there is a special library made for this, I'm using python.

© Stack Overflow or respective owner

Related posts about python

Related posts about latex