This document provides an overview of how to prepare documentation for inclusion within oomph-lib
.
doc
directory, create a directory for your documentation, e.g. Makefile.am
doc/axisym_navier_stokes/spin_up
to the file config/configure
. ac_scripts/doc
.dir_list
*
.txt
file with the same name as the newly-created directory, e.g. Makefile.am
Doxyfile
Makefile.am
after "docfile ="
, add the stem of the *
.txt
file created in step 4, e.g. Doxyfile
update the (relative) path to the demo-driver directory. Two entries must be updated, one following "INPUT"
and the other following "EXAMPLE_PATH"
. To find these, search for "../.."
.oomph-lib's
top-level directory and re-run autogen
.sh:
If your documentation is to contain figures or animations, the following subdirectories must be created within your documentation directory:
figures
*
.gif
and *
.eps
formats (*
.gif
is used for the html
documentation whilst *
.eps
is used for LaTeX
).non_distfigures
*
.lay
and *
.lpk
files that were used to create figures, along with any macro (*
.mcr
) files.The "source" of the documentation is contained in the *
.txt
file (a mixture of html/doxygen
markup). The title must follow the tag \mainpage
and be all on one line, e.g.
The main body of the text just follows as in a LaTeX
document, with line spacings indicating paragraph breaks.
Any standard html tags can be used (for example, <hr>
inserts a horizontal line). Hyperlinks are inserted in the following way:
Note that the ".."
is present in the path above because during the build process the documentation is created in subdirectories of the directory in which the source file is located. See the section Generating the documentation below for more details.
To link to the documentation of another demo driver, poisson/one_d_poisson
for example, hyperlink to the index.html
file within the html
directory of that demo driver's documentation. Note that because the processed (html
) version of the documentation you are working on will live in its own html
subdirectory, it is necessary to go up three directories in order to be in oomph-lib's
doc
directory.
Sections are created as follows:
Likewise, subsections are created in the following way:
Any LaTeX
section types can be used in this way. To link to a section within a document, use the syntax \ref
section_label
, as in this example:
Equations are generated as in LaTeX
except \f
must be added before $
or [,
].
To label equations, the normal LaTeX
system cannot be used. Instead, mark an equation with the tag @E
and refer to it later using [LABEL
]@
@R
, e.g.[LABEL
]@
and then later on...
To create bullet point lists, precede each item with a -
, e.g.
To create enumerated lists, precede each item with a -#
, e.g.
A figure with the filename my_figure
.*
is inserted in the following way:
Note the space between the last character in the caption and the quotation marks. Like the equation labelling, this line is processed by the txt2h.sh
script (which is run automatically as part of the make
process) and replaced with the necessary commands that tell doxygen
to use the *
.gif
files for the html documentation and the *
.eps
files for the LaTeX
documentation.
To insert single words of code into prose, precede the word with a \c
, e.g.
To include blocks of code such as the one immediately above this line of text, use the \code
environment, e.g.
To include sections of the demo code which you are documenting, e.g. the main function of spin_up
.cc
, use the following syntax:
This only works if start_of_main
exists somewhere in spin_up
.cc
file, but any word(s) can be used as a start/endpoint. However, do not use dashes as targets because more recent versions of doxygen get very confused by this, so don't do
say.
doxygen
to ignore everything in the source file below a certain point, denote this point with @@END@@
.doxygen
that a certain section of the source file is only to be included in the html
version of the documentation and omitted in the LaTeX
version, enclose this section within \htmlonly
and
\endhtmlonly
tags. CAREFUL: With recent version of doxygen, this has caused problems with certain commands not being interpreted correctly. Best not to use this... The following item is a work-around:suppress_latex_in_this_directory
to the Makefile.am and set it to 1 to bypass the generation of latex-based documentation for a specific directory (which may contain difficult to render tables etc. and therefore cause latex to hang...). Here's an example of a Makefile.am from the directory doc/order_of_action_functions
: doxygen
that a certain section of the source file is only to be included in the LaTeX
version of the documentation and omitted in the html
version, enclose this section within \latexonly
and
\endlatexonly
tags.Once the source file has been written, simply type make
in the documentation directory to build the html
and LaTeX
versions, e.g.
Two subdirectories, html
and latex
, are now created containing the two versions of the documentation. A *
.pdf
file of the LaTeX
version is also placed in the current directory.
A pdf version of this document is available.