- reactivate graph key
[PyX/mjg.git] / examples / latex.py
blobe725e9105e6d0bb0a0f4a11f2d3ac7021a665654
1 from pyx import *
3 # set properties of the defaulttexrunner, e.g. switch to LaTeX
4 text.set(mode="latex")
6 c = canvas.canvas()
7 # the canvas, by default, uses the defaulttexrunner from the text module
8 # (this can be changed by the canvas method settexrunner)
9 c.text(0, 0, r"This is \LaTeX.")
11 # you can have several texrunners (several running TeX/LaTeX instances)
12 plaintex = text.texrunner() # plain TeX instance
13 c.insert(plaintex.text(0, -1, r"This is plain \TeX."))
15 c.writeEPSfile("latex")