perform the actual splitting of the graph styles in several parts
[PyX/mjg.git] / INSTALL
blob5662e058550ad895a20d9058ed575096d25ac57f
1 Installation
2 ============
4 Prerequisites
5 -------------
7 PyX needs Python 2.x and a TeX installation (including Type1 fonts). Try to
8 start 'python', 'tex' and 'kpsewhich cmr10.pfb' (the later should issue a full
9 path of the requested Type1 font).
11 Local usage without C extension modules
12 ---------------------------------------
14 PyX can be run without any installation. Copy the file hello.py from the
15 examples directory to the main pyx directory and type 'python hello.py'. When
16 your TeX installation isn't configured to use Type1 fonts by default, you may
17 have to insert the line 'text.set(fontmaps="psfonts.cmz")' after the pyx import
18 statement and try again. See the FAQ for further details about TeX and font
19 configuration issues.
21 Installation procedure
22 ----------------------
24 The installation of PyX is pretty straightforward if you have installed the
25 Python distutils package.
27 First, you have to decide which C extension modules you want to build. This can
28 be done by setting the respective flags in the setup.cfg config file. By default
29 no C extension modules are built and appropriate fallbacks will be used instead.
31 The build_t1strip option enables the t1strip extension module, which provides
32 partial font downloading (i.e. only the glyphs of a font that are used are
33 included in the eps file). The only requisites for building this module are the
34 Python header files and a C compiler. Note that the C compiler has to suit
35 the Python distribution you are using.
37 The second extension module pykpathsea provides Python binding for the kpathsea
38 library, which enables fast searching for files in the TeX/LaTeX directory
39 hierarchy. You will need the header files of this library, which are not
40 included in many standard TeX distributions. Besides that, the fallback, which
41 uses the kpsewhich program, works equally well, although it is not as efficient
42 as using the library directly. If you want to build the C extension module, you
43 may also have to specify the location of the kpathsea header files and of the
44 library itself in the setup.cfg file.
46 After you have adapted the setup.cfg file to your needs, you can either build
47 the extension modules locally by running
49     python setup.py build_ext -i
51 or install PyX system wide by using
53     python setup.py install
55 or an appropriate variant thereof.