aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: d5aab21ffa9f319fbab6adaeafd7702f938d50b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Introduction
------------

This directory contains reStructuredText (reST) source files used to
generate the documentation for LeafLabs' libmaple and Maple IDE
projects.  For more information on these projects, see their GitHub
pages:

    https://github.com/leaflabs/libmaple
    https://github.com/leaflabs/maple-ide

While the two projects are developed separately, they are released in
lockstep, and Maple IDE depends upon libmaple.  (libmaple doesn't
depend on Maple IDE).

The generated documentation for the latest libmaple and Maple IDE
release is available online in HTML form:

    http://leaflabs.com/docs/

The web interface is the recommended way for users to read the
documentation.  Older versions are available as well:

    http://static.leaflabs.com/pub/leaflabs/maple-docs/

This file contains instructions for generating the HTML files.

About the Documentation
-----------------------

The docs are written in Sphinx's extensions to reStructuredText
(reST).  You can read more about Sphinx here:

    http://sphinx.pocoo.org/tutorial.html

Much of the documentation is pulled out of the libmaple source code;
we pull Doxygen's XML output into Sphinx documentation.  You can read
more about Doxygen here:

    http://doxygen.org

We use a Sphinx plugin called Breathe to parse Doxygen's XML output
into a form usable by Sphinx.  You can read more about Breathe here:

    http://michaeljones.github.com/breathe/

Documentation Build Steps
-------------------------

You first need to produce Doxygen XML output, then you can generate
the HTML documentation.

1. You need a recent-ish version of Doxygen in your PATH:

    http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc

2. Install Breathe, which does Doxygen-to-Sphinx conversion:

   Read/write version (for LeafLabs developers):

    $ git clone git@github.com:leaflabs/breathe.git

   Read-only version (for non-LeafLabs developers):

    $ git clone git://github.com/leaflabs/breathe.git

   After that's done, set an environment variable BREATHE_HOME to
   point to where you downloaded it.  Something like this on bash:

    $ export BREATHE_HOME=/path/to/breathe/repo/

   (You'll want to put this in your shell startup script).

3. Install Sphinx.

   From source or .egg:

    http://pypi.python.org/pypi/Sphinx#downloads

   Via easy_install:

    $ sudo easy_install -U Sphinx

   You need Sphinx version >= 1.0.6.

4. Before the first time you run Sphinx (and any time the Doxygen
   comments in the libmaple source code are changed), you'll need to
   rebuild libmaple's Doxygen XML output.  That is, from within the
   libmaple (i.e., NOT THIS REPOSITORY), run:

    $ make doxygen

5. Finally, you can build the documentation (in this folder):

    $ make html

   On Windows, use the batch file make.bat instead.

Reading and Modifying the Documentation
---------------------------------------

Just point your web browser at the file

  build/html/index.html

It corresponds to the Sphinx file

  source/index.rst

Read more about Sphinx and use the existing docs source as an example
when writing yours.  The directory tmpl/ contains template ReST files
you should modify when creating a new page, in order to keep the style
consistent.

The file source/conf.py is the Sphinx configuration file; you can go
read it for more information about our setup.

All of the documentation which isn't pulled out of source code
comments lives in source/.  The directory source/_static/ is for
static content (like style sheets); source/_templates/ is meant to
contain Sphinx templates.