File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,25 +86,6 @@ def depart_latex_math_latex(self, node):
8686 LaTeXTranslator .visit_latex_math = visit_latex_math_latex
8787 LaTeXTranslator .depart_latex_math = depart_latex_math_latex
8888
89- from os .path import isfile
90-
91- # This calls out to LaTeX to render the expression
92- def latex2png (latex , name ):
93- f = open ('math.tex' , 'w' )
94- f .write (r"""\documentclass[12pt]{article}
95- \pagestyle{empty}
96- \begin{document}""" )
97- if inline :
98- f .write ('$%s$' % latex )
99- else :
100- f .write (r'\[ %s \]' % latex )
101- f .write ('\end{document}' )
102- f .close ()
103- os .system ('latex --interaction=nonstopmode math.tex > /dev/null' )
104- os .system ('dvipng -bgTransparent -Ttight --noghostscript -l10 ' +
105- '-o %s math.dvi > /dev/null' % name )
106-
107-
10889from matplotlib import rcParams
10990from matplotlib .mathtext import MathTextParser
11091rcParams ['mathtext.fontset' ] = 'cm'
You can’t perform that action at this time.
0 commit comments