Showing LaTeX equations
Code: "tech_latex.py". Programming language: Python DMelt Version 1.7. Last modified: 02/09/1971. License: Pro
https://datamelt.org/code/cache/tech_latex_8162.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.


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)


Ads help maintain this website.