eqtexsvg.py revision 22e6ef64d9369a4e02ad766f13c74b25d8a5cc43
# -*- coding: cp1252 -*-
"""
functions for converting LaTeX equation string into SVG path
This extension need, to work properly:
- pstoedit software: <http://www.pstoedit.net/pstoedit>
Copyright (C) 2006 Julien Vitard <julienvitard@gmail.com>
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
\\documentclass{article}
\\usepackage{amsmath}
\\usepackage{amssymb}
\\usepackage{amsfonts}
\\thispagestyle{empty}
\\begin{document}
""")
else:
for c in node_in.childNodes:
if c.localName == 'g':
child.setAttribute('transform','matrix('+str(doc_sizeH/700.)+',0,0,'+str(-doc_sizeH/700.)+','+str(-doc_sizeH*0.25)+','+str(doc_sizeW*0.75)+')')
return node_out
help="LaTeX formula")
def clean():
try:
except OSError:
os.system('cd ' + base_dir + '; pstoedit -f plot-svg -dt -ssp ' + ps_file + ' ' + svg_file + '&> ' + out_file)
clean()
e = EQTEXSVG()
e.affect()