c files included
[PyX/mjg.git] / examples / latex.py
blob81aea0e15d0284f5e3ab57aa06740aedf6178ba4
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.writetofile("latex")