'generates a postscript file containing latex\'s rendering of tex string
returns the file name'

def make_ps(self, tex, fontsize):

    basefile = self.get_basefile(tex, fontsize)
    psfile = (u'%s.epsf' % basefile)
    if (DEBUG or (not os.path.exists(psfile))):
        dvifile = self.make_dvi(tex, fontsize)
        command = [str(u'dvips'), u'-q', u'-E', u'-o', os.path.basename(psfile), os.path.basename(dvifile)]
        mpl.verbose.report(command, u'debug')
        try:
            report = subprocess.check_output(command, cwd=self.texcache, stderr=subprocess.STDOUT)
        except subprocess.CalledProcessError as exc:
            raise RuntimeError((u'dvips    was    not    able    to    process    the    following    string:\n%s\n\nHere    is    the    full    report    generated    by    dvips:\n%s    \n\n' % (repr(tex.encode(u'unicode_escape')), exc.output.decode(u'utf-8'))))
        mpl.verbose.report(report, u'debug')
    return psfile
