latex2e writer : Move usepackage hyperref after stylesheet inclusion.
[docutils.git] / README.txt
blob53384ca25b29a847033873234e7724da8100ed40
1 ==================
2  README: Docutils
3 ==================
5 :Author: David Goodger
6 :Contact: goodger@python.org
7 :Date: $Date$
8 :Web site: http://docutils.sourceforge.net/
9 :Copyright: This document has been placed in the public domain.
11 .. contents::
14 Quick-Start
15 ===========
17 This is for those who want to get up & running quickly.  Read on for
18 complete details.
20 1. Get and install the latest release of Python, available from
22        http://www.python.org/
24    Python 2.2 or later [1]_ is required; Python 2.2.2 or later is
25    recommended.
27 2. Use the latest Docutils code.  Get the code from Subversion or from
28    the snapshot:
30        http://docutils.sf.net/docutils-snapshot.tgz
32    See `Releases & Snapshots`_ below for details.
34 3. Unpack the tarball in a temporary directory (**not** directly in
35    Python's ``site-packages``) and run ``install.py`` with admin
36    rights.  On Windows systems it may be sufficient to double-click
37    ``install.py``.  On Unix or Mac OS X, type::
39         su
40         (enter admin password)
41         ./install.py
43    See Installation_ below for details.
45 4. Use a front-end tool from the "tools" subdirectory of the same
46    directory as in step 3.  For example::
48        cd tools
49        ./rst2html.py ../FAQ.txt ../FAQ.html        (Unix)
50        python rst2html.py ..\FAQ.txt ..\FAQ.html   (Windows)
52    See Usage_ below for details.
55 Purpose
56 =======
58 The purpose of the Docutils project is to create a set of tools for
59 processing plaintext documentation into useful formats, such as HTML,
60 XML, and LaTeX.  Support for the following sources has been
61 implemented:
63 * Standalone files.
65 * `PEPs (Python Enhancement Proposals)`_.
67 Support for the following sources is planned:
69 * Inline documentation from Python modules and packages, extracted
70   with namespace context.
72 * Email (RFC-822 headers, quoted excerpts, signatures, MIME parts).
74 * Wikis, with global reference lookups of "wiki links".
76 * Compound documents, such as multiple chapter files merged into a
77   book.
79 * And others as discovered.
81 .. _PEPs (Python Enhancement Proposals):
82    http://www.python.org/peps/pep-0012.html
85 Releases & Snapshots
86 ====================
88 While we are trying to follow a "release early & often" policy,
89 features are added very frequently.  Since the code in the Subversion
90 repository is usually in a bug-free state, we recommend that you use
91 the current snapshot (which is usually updated within an hour of
92 changes being committed to the repository):
94 * Snapshot of Docutils code, documentation, front-end tools, and
95   tests: http://docutils.sf.net/docutils-snapshot.tgz
97 * Snapshot of the Sandbox (experimental, contributed code):
98   http://docutils.sf.net/docutils-sandbox-snapshot.tgz
100 To keep up to date on the latest developments, download fresh copies
101 of the snapshots regularly.  New functionality is being added weekly,
102 sometimes daily.  (There's also the `Subversion repository`_.)
104 .. _Subversion repository: docs/dev/repository.html
107 Requirements
108 ============
110 To run the code, Python 2.2 or later [1]_ must already be installed.
111 The latest release is recommended.  Python is available from
112 http://www.python.org/.
114 The `Python Imaging Library`, or PIL, is used for some image
115 manipulation operations if it is installed.
117 .. [1] Python 2.1 may be used providing the compiler package is
118    installed.  The compiler package can be found in the Tools/
119    directory of Python 2.1's source distribution.
121 .. _Python Imaging Library: http://www.pythonware.com/products/pil/
122 .. _Optik: http://optik.sourceforge.net/
125 Project Files & Directories
126 ===========================
128 * README.txt: You're reading it.
130 * COPYING.txt: Public Domain Dedication and copyright details for
131   non-public-domain files (most are PD).
133 * FAQ.txt: Frequently Asked Questions (with answers!).
135 * RELEASE-NOTES.txt: Summary of the major changes in recent releases.
137 * HISTORY.txt: A detailed change log, for the current and all previous
138   project releases.
140 * BUGS.txt: Known bugs, and how to report a bug.
142 * THANKS.txt: List of contributors.
144 * setup.py: Installation script.  See "Installation" below.
146 * install.py: Quick & dirty installation script.  Just run it.  For
147   any kind of customization or help though, setup.py must be used.
149 * docutils: The project source directory, installed as a Python
150   package.
152 * extras: Directory for third-party modules that Docutils depends on.
153   These are only installed if they're not already present.
155 * docs: The project documentation directory.  Read ``docs/index.txt``
156   for an overview.
158 * docs/user: The project user documentation directory.  Contains the
159   following documents, among others:
161   - docs/user/tools.txt: Docutils Front-End Tools
162   - docs/user/latex.txt: Docutils LaTeX Writer
163   - docs/user/rst/quickstart.txt: A ReStructuredText Primer
164   - docs/user/rst/quickref.html: Quick reStructuredText (HTML only)
166 * docs/ref: The project reference directory.
167   ``docs/ref/rst/restructuredtext.txt`` is the reStructuredText
168   reference.
170 * licenses: Directory containing copies of license files for
171   non-public-domain files.
173 * tools: Directory for Docutils front-end tools.  See
174   ``docs/user/tools.txt`` for documentation.
176 * test: Unit tests.  Not required to use the software, but very useful
177   if you're planning to modify it.  See `Running the Test Suite`_
178   below.
181 Installation
182 ============
184 The first step is to expand the ``.tgz`` archive in a temporary
185 directory (**not** directly in Python's ``site-packages``).  It
186 contains a distutils setup file "setup.py".  OS-specific installation
187 instructions follow.
190 GNU/Linux, BSDs, Unix, Mac OS X, etc.
191 -------------------------------------
193 1. Open a shell.
195 2. Go to the directory created by expanding the archive::
197        cd <archive_directory_path>
199 3. Install the package::
201        python setup.py install
203    If the python executable isn't on your path, you'll have to specify
204    the complete path, such as /usr/local/bin/python.  You may need
205    root permissions to complete this step.
207    You can also just run install.py; it does the same thing.
210 Windows
211 -------
213 Just double-click ``install.py``.  If this doesn't work, try the
214 following:
216 1. Open a DOS Box (Command Shell, MS-DOS Prompt, or whatever they're
217    calling it these days).
219 2. Go to the directory created by expanding the archive::
221        cd <archive_directory_path>
223 3. Install the package::
225        <path_to_python.exe>\python setup.py install
228 Usage
229 =====
231 After unpacking and installing the Docutils package, the following
232 shell commands will generate HTML for all included documentation::
234     cd <archive_directory_path>/tools
235     ./buildhtml.py ../
237 On Windows systems, type::
239     cd <archive_directory_path>\tools
240     python buildhtml.py ..
242 The final directory name of the ``<archive_directory_path>`` is
243 "docutils" for snapshots.  For official releases, the directory may be
244 called "docutils-X.Y.Z", where "X.Y.Z" is the release version.
245 Alternatively::
247     cd <archive_directory_path>
248     tools/buildhtml.py --config=tools/docutils.conf          (Unix)
249     python tools\buildhtml.py --config=tools\docutils.conf   (Windows)
251 Some files may generate system messages (warnings and errors).  The
252 ``docs/user/rst/demo.txt`` file (under the archive directory) contains
253 5 intentional errors.  (They test the error reporting mechanism!)
255 There are many front-end tools in the unpacked "tools" subdirectory.
256 You may want to begin with the "rst2html.py" front-end tool.  Most
257 tools take up to two arguments, the source path and destination path,
258 with STDIN and STDOUT being the defaults.  Use the "--help" option to
259 the front-end tools for details on options and arguments.  See
260 Docutils Front-End Tools (``docs/user/tools.txt``) for full documentation.
262 The package modules are continually growing and evolving.  The
263 ``docutils.statemachine`` module is usable independently.  It contains
264 extensive inline documentation (in reStructuredText format of course).
266 Contributions are welcome!
269 Running the Test Suite
270 ======================
272 To run the entire test suite, after installation_ open a shell and use
273 the following commands::
275     cd <archive_directory_path>/test
276     ./alltests.py
278 Under Windows, type::
280     cd <archive_directory_path>\test
281     python alltests.py
283 You should see a long line of periods, one for each test, and then a
284 summary like this::
286     Ran 518 tests in 24.653s
288     OK
289     Elapsed time: 26.189 seconds
291 The number of tests will grow over time, and the times reported will
292 depend on the computer running the tests.  The difference between the
293 two times represents the time required to set up the tests (import
294 modules, create data structures, etc.).
296 If any of the tests fail, please `open a bug report`_, `send email`_,
297 or post a message via the `web interface`_.  Please include all
298 relevant output, information about your operating system, Python
299 version, and Docutils version.  To see the Docutils version, use these
300 commands in the shell::
302     cd ../tools
303     ./quicktest.py --version
305 Windows users type these commands::
307     cd ..\tools
308     python quicktest.py --version
310 .. _open a bug report:
311    http://sourceforge.net/tracker/?group_id=38414&atid=422030
312 .. _send email: mailto:docutils-users@lists.sourceforge.net
313    ?subject=Test%20suite%20failure
314 .. _web interface: http://post.gmane.org/post.php
315    ?group=gmane.text.docutils.user&subject=Test+suite+failure
318 Getting Help
319 ============
321 If you have questions or need assistance with Docutils or
322 reStructuredText, please post a message to the Docutils-users_ mailing
323 list.
325 .. _Docutils-users: docs/user/mailing-lists.html#docutils-users
329    Local Variables:
330    mode: indented-text
331    indent-tabs-mode: nil
332    sentence-end-double-space: t
333    fill-column: 70
334    End: