2015-05-10 14:52:13 +07:00
|
|
|
.. _devguide_docbuild:
|
|
|
|
|
|
|
|
|
|
=============================
|
|
|
|
|
Building Sphinx Documentation
|
|
|
|
|
=============================
|
|
|
|
|
|
|
|
|
|
In order to build the documentation in the ``docs`` directory, you will need to
|
2023-06-13 06:19:10 -05:00
|
|
|
have the several third-party Python packages installed, including `Sphinx
|
|
|
|
|
<https://www.sphinx-doc.org/en/master/>`_. To install the necessary
|
|
|
|
|
prerequisites, provide the optional "docs" dependencies when installing OpenMC's
|
|
|
|
|
Python API. That is, from the root directory of the OpenMC repository:
|
2015-05-10 14:52:13 +07:00
|
|
|
|
|
|
|
|
.. code-block:: sh
|
|
|
|
|
|
2025-01-21 16:27:01 -06:00
|
|
|
python -m pip install ".[docs]"
|
2015-05-10 14:52:13 +07:00
|
|
|
|
2026-07-17 10:47:40 -05:00
|
|
|
The OpenMC documentation also uses Doxygen to automatically generate its
|
|
|
|
|
C/C++ API documentation directly from the docstrings available in the source
|
|
|
|
|
code. You will need to have a working installation of Doxygen to generate the
|
|
|
|
|
documentation locally.
|
|
|
|
|
|
2015-05-10 14:52:13 +07:00
|
|
|
-----------------------------------
|
|
|
|
|
Building Documentation as a Webpage
|
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
|
|
To build the documentation as a webpage (what appears at
|
2019-10-03 13:17:15 -05:00
|
|
|
https://docs.openmc.org), simply go to the ``docs`` directory and run:
|
2015-05-10 14:52:13 +07:00
|
|
|
|
|
|
|
|
.. code-block:: sh
|
|
|
|
|
|
|
|
|
|
make html
|
|
|
|
|
|
|
|
|
|
-------------------------------
|
|
|
|
|
Building Documentation as a PDF
|
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
|
|
To build PDF documentation, you will need to have a LaTeX distribution installed
|
2017-12-29 15:10:55 -06:00
|
|
|
on your computer. Once you have a LaTeX distribution installed, simply go to the
|
|
|
|
|
``docs`` directory and run:
|
2015-05-10 14:52:13 +07:00
|
|
|
|
|
|
|
|
.. code-block:: sh
|
|
|
|
|
|
|
|
|
|
make latexpdf
|