Debian Codegraph @

docs/install.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <chapter id="sec-install">
3 <title>Installing the Package</title>
4
5 <section>
6 <title>Content</title>
7
8 <para>The source package contains the following:</para>
9
10 <variablelist>
11 <varlistentry>
12 <term>docs/</term>
13
14 <listitem>
15 <para>Contains the files of this document.</para>
16 </listitem>
17 </varlistentry>
18
19 <varlistentry>
20 <term>etc/</term>
21
22 <listitem>
23 <para>Contains the XML configuration schemas, to use to validate your
24 configuration files.</para>
25 </listitem>
26 </varlistentry>
27
28 <varlistentry>
29 <term>latex/</term>
30
31 <listitem>
32 <para>Contains all the latex stuff: LaTeX style files, logos, and scripts to
33 compile the LaTeX output.</para>
34 </listitem>
35 </varlistentry>
36
37 <varlistentry>
38 <term>scripts/</term>
39
40 <listitem>
41 <para>Several scripts, including the main script of the package.</para>
42 </listitem>
43 </varlistentry>
44
45 <varlistentry>
46 <term>xsl/</term>
47
48 <listitem>
49 <para>XSL stylesheets.</para>
50 </listitem>
51 </varlistentry>
52
53 <varlistentry>
54 <term>tests/</term>
55
56 <listitem>
57 <para>Test files.</para>
58 </listitem>
59 </varlistentry>
60 </variablelist>
61 </section>
62
63 <section id="sec-install-unix">
64 <title>Installing on Unix like Systems</title>
65
66 <section>
67 <title>Dblatex Packages</title>
68
69 <para>Dblatex is packaged for these Systems or Distributions:</para>
70
71 <itemizedlist>
72 <listitem>
73 <para><ulink url="http://packages.debian.org/dblatex">Linux Debian</ulink>,
74 <ulink
75 url="http://packages.ubuntu.com/search?keywords=dblatex">Ubuntu</ulink>,</para>
76 </listitem>
77
78 <listitem>
79 <para><ulink
80 url="http://download.opensuse.org/repositories/home:/thomas-schraitle">Linux
81 OpenSUSE (RPM)</ulink>, <ulink
82 url="https://admin.fedoraproject.org/pkgdb/packages/name/dblatex">Linux Fedora
83 (RPM)</ulink>,</para>
84 </listitem>
85
86 <listitem>
87 <para><ulink url="http://www.freshports.org/textproc/dblatex">FreeBSD</ulink>,
88 <ulink url="http://pkgsrc.se/textproc/dblatex">NetBSD</ulink>,</para>
89 </listitem>
90
91 <listitem>
92 <para><ulink url="http://pdb.finkproject.org/pdb/package.php/dblatex">Mac OS X
93 (Fink)</ulink>.</para>
94 </listitem>
95 </itemizedlist>
96
97 <para> If you are installing on one of these distributions, follow their
98 recommended way of installation, and you can safely ignore the next sections
99 that give details for installing dblatex from the source tarball.</para>
100 </section>
101
102 <section>
103 <title>Dependencies</title>
104
105 <para>To work, the following items must be available:</para>
106
107 <itemizedlist>
108 <listitem>
109 <para>An XSLT. <filename>xsltproc</filename> is the default XSLT used, but one
110 can also use <ulink url="http://4suite.org">4suite</ulink> or <ulink url="http://saxon.sourceforge.net">saxon</ulink>.</para>
111 </listitem>
112
113 <listitem>
114 <para>The XML DocBook DTD.</para>
115 </listitem>
116
117 <listitem>
118 <para>A recent LaTeX distribution. The configure script checks that the needed
119 latex packages are available.</para>
120 </listitem>
121
122 <listitem>
123 <para>Python &gt;= 3.2.</para>
124 </listitem>
125 </itemizedlist>
126 </section>
127
128 <section>
129 <title>Installation</title>
130
131 <section>
132 <title>Installing the dependencies</title>
133
134 <para>To use the package, install properly the dependencies:</para>
135
136 <orderedlist>
137 <listitem>
138 <para>Install Python if necessary.</para>
139 </listitem>
140
141 <listitem>
142 <para>Install LaTeX.</para>
143 </listitem>
144
145 <listitem>
146 <para>Install the XSLT. By default <filename>xsltproc</filename> is
147 used.</para>
148 </listitem>
149
150 <listitem>
151 <para>Install the XML DocBook DTD.</para>
152 </listitem>
153
154 <listitem>
155 <para>Create a catalog file, that defines where to find the DTD. Here is an
156 example:</para>
157
158 <programlisting>
159 PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
160 "file:///usr/local/share/xml/docbook/dtd/4.1.2/docbookx.dtd"
161 </programlisting>
162
163 <para>If the XML Gnome tools are available, it's a good idea to create an XML
164 catalog by using <filename>xmlcatalog</filename> such like this:</para>
165
166 <programlisting>
167 % xmlcatalog --noout --create mycatalog
168 % xmlcatalog --noout --add 'public' '-//OASIS//DTD DocBook XML V4.1.2//EN' \
169 'file://path/to/4.1.2/docbookx.dtd' mycatalog
170 </programlisting>
171 </listitem>
172
173 <listitem>
174 <para>Add the catalog path to the SGML_CATALOG_FILES variable:</para>
175
176 <programlisting>export SGML_CATALOG_FILES=$SGML_CATALOG_FILES:/path/to/mycatalog
177 </programlisting>
178
179 <para>You can skip this step if you configure the dblatex installation with
180 the <option>--catalogs</option> option.</para>
181 </listitem>
182 </orderedlist>
183 </section>
184
185 <section>
186 <title>Installing from the source tarball</title>
187
188 <para>The steps to follow are the following:</para>
189
190 <orderedlist>
191 <listitem>
192 <para>Untar the ball. For a bzipped release, do as follow:</para>
193
194 <screen>% tar xvfj dblatex-x.x.x.tar.bz2</screen>
195
196 <para>For a gzipped release, do as follow:</para>
197
198 <screen>% tar xvfz dblatex-x.x.x.tar.gz</screen>
199 </listitem>
200
201 <listitem>
202 <para>Install the package. The installation script preliminary checks the
203 dependencies. In the example, the <filename>dblatex</filename> script is
204 installed under <filename>/usr/local/bin</filename> and the other files are
205 installed under <filename>/usr/local/share/dblatex</filename>. Besides, the
206 <option>--catalogs</option> option tells where to find the catalogs.</para>
207
208 <programlisting>
209 % cd dblatex-x.x.x
210 % python ./setup.py install --prefix=/usr/local --catalogs=/path/to/mycatalog
211 </programlisting>
212 </listitem>
213 </orderedlist>
214 </section>
215 <section id="sec-install-pypi">
216 <title>Installing from the Python Egg</title>
217
218 <para>Since version 0.3.2 dblatex is distributed as a Python Egg in the <ulink url="http://pypi.python.org/pypi">Python Package Index (PyPI)</ulink>. It requires to have <command>easy_install</command> installed.</para>
219
220 <para>The procedure to follow is:</para>
221
222 <orderedlist>
223 <listitem>
224 <para>Call simply easy_install:</para>
225 <screen>
226 % <userinput>easy_install dblatex</userinput>
227 Searching for dblatex
228 Reading http://pypi.python.org/simple/dblatex/
229 Reading http://dblatex.sf.net
230 Best match: dblatex 0.3.1.1
231 Downloading http://pypi.python.org/packages/2.5/d/dblatex/dblatex-0.3.1.1-py2.5.egg#md5=8520d596e473ff544eb9dcdc5175d7ae
232 Processing dblatex-0.3.1.1-py2.5.egg
233 creating /path/to/dblatex-0.3.1.1-py2.5.egg
234 Extracting dblatex-0.3.1.1-py2.5.egg to /path/to
235 Adding dblatex 0.3.1.1 to easy-install.pth file
236 Installing dblatex script to /path/to
237
238 Installed /path/to/dblatex-0.3.1.1-py2.5.egg
239 </screen>
240 </listitem>
241 </orderedlist>
242 <para>That's it!</para>
243 </section>
244 </section>
245 </section>
246
247 <section>
248 <title>Installing on Windows</title>
249
250 <para>The following packages to install and the procedure is for a native
251 Windows installation. If you want to use dblatex via Cygwin instead, you
252 should consider it like a unix like install.</para>
253
254 <section>
255 <title>Dependencies</title>
256
257 <para>The following applications are required: <itemizedlist>
258 <listitem>
259 <para>An XSLT. <filename>xsltproc</filename> is the default XSLT used, but one
260 can also use <ulink url="http://foursuite.sourceforge.net">4suite</ulink>.</para>
261 </listitem>
262
263 <listitem>
264 <para>The XML DocBook DTD.</para>
265 </listitem>
266
267 <listitem>
268 <para><ulink url="http://www.miktex.org">MiKTeX</ulink> &gt; 2.5.</para>
269 </listitem>
270
271 <listitem>
272 <para><ulink url="http://www.python.org">Python</ulink> &gt;= 3.2.3.</para>
273 </listitem>
274 </itemizedlist></para>
275 </section>
276
277 <section>
278 <title>Installation</title>
279
280 <section>
281 <title>Installing xsltproc</title>
282
283 <para>You can download the binaries and getting the installation instructions
284 from: <ulink url="http://www.zlatkovic.com/libxml.en.html"></ulink>.</para>
285 </section>
286
287 <section>
288 <title>Installing MiKTeX</title>
289
290 <para>Install the minimal distribution, and add the following packages:
291 changebar, colortbl, fancybox, fancyhdr, fancyvrb, listings, overpics,
292 rotating, subfigure, titlesec, bibtopic, enumitem, eepic, lm, lastpage,
293 helvetic, times, symbol, courier, footmisc, ifxetex, pdfpages, wasysym.</para>
294 </section>
295
296 <section>
297 <title>Installing dblatex</title>
298
299 <para>From the unpacked package directory just type:</para>
300
301 <screen>python setup.py install</screen>
302
303 <para>If the Python directory is <filename>C:\Python25</filename> you can now
304 try <command>dblatex</command> by typing:</para>
305
306 <screen>python C:\Python25\Scripts\dblatex file.xml</screen>
307 </section>
308 </section>
309 </section>
310 </chapter>