1 ========================================
2 Editing and building the Charm++ manuals
3 ========================================
5 The Charm++ manuals in this directory are written in reStructuredText (RST,
6 http://docutils.sourceforge.net/rst.html) and meant to be built with the
7 sphinx documentation generator (http://www.sphinx-doc.org/). Pre-built
8 versions are available on readthedocs.io (https://charm.readthedocs.io).
10 This file describes how the documentation can be edited and built locally.
15 Sphinx supports building HTML and PDF versions of the manual. For the HTML
16 version, only Sphinx is required. Creating the PDF manual also requires pdflatex.
18 Building the HTML manual:
24 $ sphinx-build . html/
25 $ firefox html/index.html
28 Building the PDF manual:
34 $ sphinx-build -b latex . latex/
43 This section gives a brief overview of reStructuredText (RST) with the most
44 important items for the Charm++ manual. A more comprehensive manual is
45 available here: http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html.
47 This file itself is written in RST -- take a look at the source if something is unclear.
71 Sections get defined by underlining their title:
78 - First level: ``======``
79 - Second level: ``-----``
80 - Third level: ``~~~~~~``
81 - Fourth level: ``^^^^^``
82 - Fifth level: ``'''''``
84 The underline has to have the same length as the title itself.
90 - Inline code (similar to ``\texttt{}``): \`\`int foo()\`\`: ``int foo();``
92 - Inline code is not syntax-highlighted.
94 - Code blocks (similar to ``\begin{alltt} .. \end{alltt}``):
96 - Code blocks have syntax highlighting via the pygments
97 (http://pygments.org) library.
99 - Do not use the default ``::`` highlighting mode, but specify the
100 language explicitly: ``.. code-block:: fortran`` (or ``c++``, ``none``, ...)
104 .. code-block:: fortran
109 Versions of pygments newer than 2.3.1 will allow specifying ``charmci`` as the
110 language for ci-files (instead of using C++).
117 .. figure:: figures/detailedsim_newer.png
121 Figure caption goes here.
131 .. table:: Table caption goes here.
134 ============= ==================== ========================================================
135 C Field Name Fortran Field Offset Use
136 ============= ==================== ========================================================
137 maxResidual 1 If nonzero, termination criteria: magnitude of residual.
138 maxIterations 2 If nonzero, termination criteria: number of iterations.
139 solverIn[8] 3-10 Solver-specific input parameters.
140 ============= ==================== ========================================================
144 .. table:: Table caption goes here.
147 ============= ==================== ========================================================
148 C Field Name Fortran Field Offset Use
149 ============= ==================== ========================================================
150 maxResidual 1 If nonzero, termination criteria: magnitude of residual.
151 maxIterations 2 If nonzero, termination criteria: number of iterations.
152 solverIn[8] 3-10 Solver-specific input parameters.
153 ============= ==================== ========================================================
158 Adding reference labels
159 ~~~~~~~~~~~~~~~~~~~~~~~
161 Labels to refer to tables and figures are created by the ``:name:`` property above.
162 Create labels for sections like this:
170 Section ABCD can now be referenced with ``my-label`` (note the missing ``_``
171 and ``:`` in the reference).
177 - With number (best for figures & tables): ``:numref:`reference_name```
178 - With text: ``:ref:`reference_name``` (text will be taken from referenced item automatically)
179 - With custom text: ``:ref:`Custom text here <reference_name>```
184 URLs get parsed and displayed as links automatically. For example: https://charm.cs.illinois.edu/
191 This is a reference [Ref]_ .
193 .. [Ref] Paper or article reference, URL, ...
200 This text has a footnote [1]_
202 .. [1] Text of the footnote.