Content |
Getting Started
At the bottom of every page generated by doctool you see a link labeled View document source. Click it and you see the source file from which the HTML code was generated.
On the top right you see a link labeled Browse Files that leads you to a file-tree style browser containing all C++ or doc-files within this folder.
It uses some reStructuredText dialect for writing documents.
Installation
As doctool was developed for private use this is the hard part:
-
First get dcotool from gitHub:
git clone git://github.com/michael-lehn/DocTool.git
-
Adapt some shell variables in DocTool/Configuration/doctool.config. Idealy you only have to change two variables:
-
VIMRUNTIME
-
CXXFLAGS
-
-
Adapt your .profile, such that doctool is in the PATH and can find itself, e.g.
# ...
export DOCTOOL=${HOME}/DocTool/
export PATH=$PATH:${DOCTOOL}/Executables
# ...
-
I justed started to use libclang (from the clang compiler project) for creating cross references in the HTML-formated C++ source code and for generating API documentation. If you want to use these features you have to adapt the Makefile in DocTool/CxxTools. Please understand that this part is even more experimental than the rest.
Test Your Installation
Change to DocTool/Examples and run doctool --convertSourcefiles.
-
The option --convertSourcefiles will convert the C++ codes to HTML and applies the cross referencing it get from libclang.
-
If you only run doctool without further options it only will process *.doc files the current directory or any subdirectory.
-
If you run doctool in a directory that contains a doctool.preconfig file, it will evaluate it before parsing any 'doc' file.
Examples
-
Example 1: Writing a simple tutorial for the Hello world! programm.
-
Example 2: Class API Documentation.
-
Example 3: Literate Programming.
More Examples
Originally the sole purpose of doctool was the creation of documentation and tutorials for FLENS. So you can see more examples there:
-
Tables and other formatting: FLENS-LAPACK
-
Class API: GeMatrix, DenseVector
-
Small examples: lapack-gelsy
-
C++ Source Code Listings with Cross References: mv, gesv (linked keyword are underlined with dots).
-
...
Final Note
Make sure your editor expands tabs to spaces. Otherwise you will go nuts.