from jhplot import *
from net.sf.drawj2d import Drawj2d

f="drawing.hcl"
out="drawing.svg"

s="""
# Font size in mm
font 6
# TeX Text style
moveto 20 20
texlabel {X_i = \sum_{j=1}^{N} a_{ij} f_j}

# TeX Display style
moverel 0 20
texlabel {\displaystyle X_i = \sum_{j=1}^{N} a_{ij} f_j}


"""
with open(f, "w") as xfile:
    xfile.write(s)

args=["-T" "svg", "-W", "100", "-H", "60", "-o", out, f]
Drawj2d.Run(args)
IViewSVG(out)

