fix defaults for x any y (to be strings)
[PyX.git] / examples / text / texrunner.py
blobdb8c99261b09ef77daabbb474554d6b27996e70e
1 from pyx import *
3 # Set properties of the defaulttexrunner, e.g. switch to LaTeX.
4 text.set(text.LatexRunner)
6 c = canvas.canvas()
7 # The canvas, by default, uses the default_runner from the text module.
8 # This can be changed by the canvas method settexrunner.
9 c.text(0, 0, r"This is \LaTeX.")
11 # If you want to use another texrunner temporarily, you can just insert
12 # a text box manually
13 plaintex = text.TexRunner() # plain TeX runner
14 c.insert(plaintex.text(0, -1, r"This is plain \TeX."))
16 c.writeEPSfile("texrunner")
17 c.writePDFfile("texrunner")
18 c.writeSVGfile("texrunner")