corrected answer concerning problem coordinates
[PyX/mjg.git] / INSTALL
blobb5ae00adbf0c1543ae19ae0ac15dbad5222a2a27
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.
57 Compiling the manual
58 --------------------
60 For the layout of the manual we have made use of the standard Python
61 documentation framework. For building the manual, you will need the script
62 "mkhowto" of your Python distribution. Please make a soft-link of this script
63 into the manual directory
65     cd manual/
66     ln -s </usr/lib/>python/Doc/tools/mkhowto mkhowto
67     make
69 Note that this requires Python version 2.3. In former versions (2.2 and 2.1)
70 you will need to get the Python sources from www.python.org and try to find the
71 script there. For users of the older Python versions we have included a
72 ready-made pdf of the manual.