title: Matplotlib - Unable to save figure as eps file when using latex to render text
body: <p>I'm using latex to render text in matplotlib but I'm unable to save the figure if any text has latex environments in it. </p>
  
  <p>Simplified code:</p>
  
  <pre><code>import matplotlib as mpl
  mpl.use('PS')
  import matplotlib.pyplot as plt
  mpl.rcParams['text.usetex'] = True
  
  s = (r"\begin{description}"
       r"\item[someitem:] blah blah blah blah blah \\"
       r"Some more text that I want to add to my plot"
       r"\item[anotheritem:] This is even more text"
       r"\end{description}")
  plt.text(0,0,s)
  plt.savefig('myfig.eps')
  </code></pre>
  
  <p>I get a generic latex error when I try to save it. </p>
  
  <blockquote>
    <p>! LaTeX Error: Something's wrong--perhaps a missing \item.</p>
    
    <p>See the LaTeX manual or LaTeX Companion for explanation.
    Type  H   for immediate help.</p>
  </blockquote>
  
  <p>However, I don't think there's anything wrong with my latex. I tried compiling a latex document with just the above snippet in it and it worked fine. </p>
  
  <p>Interestingly, the plot gets rendered if I use an interactive backend with ipython/jupyter-notebook but I am still unable to save the figure as ps or eps file. It also works if I remove the <code>\begin{...} ... \end{...}</code></p>
  
  <p>How do I save the figure as a ps/eps file if I use a latex environment in the text?</p>