fix missing attribute select when using a bar style once only
[PyX/mjg.git] / INSTALL
blob100dd1916ce1e0d80b6342267990b0d40356ce66
1 Installation
2 ============
5 Prerequisites
6 -------------
8 PyX needs Python 2.1 or newer and a TeX installation (including Type1 fonts).
9 Try to start 'python', 'tex' and 'kpsewhich cmr10.pfb' (the later should issue
10 a full path of the requested Type1 font).
13 Local usage without C extension modules
14 ---------------------------------------
16 PyX can be run without any installation. To test your environment copy the file
17 hello.py from the examples directory to the main pyx directory (where the
18 subdirectory pyx containing the modules is located) and type 'python hello.py'.
19 When your TeX installation isn't configured to use Type1 fonts by default, you
20 may have to insert the line 'text.set(fontmaps="psfonts.cmz")' after the import
21 statement and try again. See the FAQ for further details about TeX and font
22 configuration issues.
25 Installation procedure
26 ----------------------
28 The installation of PyX is pretty straightforward if you have installed the
29 Python distutils package.
31 First, you have to decide which C extension modules you want to build. This can
32 be done by setting the respective flags in the setup.cfg config file. By default
33 no C extension modules are built and appropriate fallbacks will be used instead.
35 The build_t1strip option enables the t1strip extension module, which provides
36 partial font downloading (i.e. only the glyphs of a font that are used are
37 included in the resulting EPS file). The only requisites for building this
38 module are the Python header files and a C compiler. Note that the C compiler
39 has to suit the Python distribution you are using.
41 The second extension module pykpathsea provides Python binding for the kpathsea
42 library, which enables fast searching for files in the TeX/LaTeX directory
43 hierarchy. You will need the header files of this library, which unfortunately
44 are not included in many standard TeX distributions. Note that the fallback,
45 which uses the kpsewhich program, works equally well, although it is not as
46 efficient as using the library directly. If you want to build the C extension
47 module, you may also have to specify the location of the kpathsea header files
48 and of the library itself in the setup.cfg file.
50 After you have adapted the setup.cfg file to your needs, you can either build
51 the extension modules locally by running
53     python setup.py build_ext -i
55 or install PyX system wide by using
57     python setup.py install
59 or an appropriate variant thereof.
62 For Mac OS X users
63 ------------------
65 A complete install of the TeX i-Package (http://ii2.sourceforge.net/) contains
66 the kpathsea library. The include files and the library itself can be found in
67 /usr/local/teTeX/include and /usr/local/teTeX/lib, respectively. These
68 directories should be indicated in the setup.cfg file.
71 Path setup when installing to a non-standard directory layout
72 -------------------------------------------------------------
74 PyX places shared data in the directory <install-dir>/share/pyx and the system
75 wide configuration in the file <root>/etc/pyxrc. <install-dir> and <root> are
76 options to the distutils install-data command (and thus the install command).
77 See the distutils documentation for details. The final path information is
78 stored in siteconfig.py. While the original siteconfig.py calculates the
79 positions relative to its current position thus enabling local usage, during
80 install a proper siteconfig.py will be created.
83 Compiling the manual
84 --------------------
86 For the layout of the manual we have made use of the standard Python
87 documentation framework. For building the manual, you will need the script
88 "mkhowto" of your Python distribution. Please make a soft-link of this script
89 into the manual directory
91     cd manual/
92     ln -s </usr/lib/>python/doc/tools/mkhowto mkhowto
93     make
95 Note that this requires Python version 2.3 and above. When using older Python
96 versions you need to get the Python documentation sources separately from
97 http://www.python.org/ and try to find the script there. Alternatively you may
98 download the manual from the PyX homepage at http://pyx.sourceforge.net/.