title: Convert plain text to latex code programmatically
body: <p>I'd like to take some user input text and quickly parse it to produce some latex code. At the moment, I'm replacing <code>%</code> with <code>\%</code> and <code>\n</code> with <code>\n\n</code>, but I'm wondering if there are other replacements I should be making to make the conversion from plain text to latex.</p>
  
  <p>I'm not super worried about safety here (can you even write malicious latex code?), as this should only be used by the user to convert their own text into latex, and so they should probably be allowed to used their own latex markup in the pre-converted text, but I'd like to make sure the output doesn't include accidental latex commands if possible. If there's a good library to make such a conversion, I'd take a look.</p>