Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d543ed

Browse files
committed
Remove old dvipng support in mathmpl.py, since it is now in Sphinx core.
svn path=/trunk/matplotlib/; revision=6025
1 parent 3d4529a commit 7d543ed

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

doc/sphinxext/mathmpl.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff 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-
10889
from matplotlib import rcParams
10990
from matplotlib.mathtext import MathTextParser
11091
rcParams['mathtext.fontset'] = 'cm'

0 commit comments

Comments
 (0)