title: Rendering TeX from something out of a database?
body: <p>I'm using Firebase to put stuff onto a website. Something like "get a multiple choice question/options and shove them into div tags". Some of these questions use math/chemistry equations, and I think TeX would be a great tool to render.</p>
  
  <p>Basically if my question is "Which reaction is exothermic?", I want my answer choice to not look like "Na + H2O -> NaOH + H2."</p>
  
  <p>I just don't know how.</p>
  
  <p>I've tried this script, but it doesn't work. I think that's because retrieving from a database and stuffing it into a div tag via getElementById bypasses what I can do with the script.</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://latex.codecogs.com/latexit.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I think maybe I can get it to work with a document.write(), but I'm not very familiar with it (I'm not a web developer at all, sorry).</p>
  
  <p>Is there anything I can do, HTML/JavaScript/whatever that can help me with this? Thanks in advance!</p>