mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Use sphinx.ext.imgconverter for converting SVG images for PDF doc builds
This commit is contained in:
parent
98b2bcb275
commit
6b48fe9f6b
4 changed files with 13 additions and 34 deletions
|
|
@ -5,15 +5,16 @@ Building Sphinx Documentation
|
|||
=============================
|
||||
|
||||
In order to build the documentation in the ``docs`` directory, you will need to
|
||||
have the Sphinx_ third-party Python package. The easiest way to install Sphinx
|
||||
is via pip:
|
||||
have the `Sphinx <http://openmc.readthedocs.io/en/latest/>`_ third-party Python
|
||||
package. The easiest way to install Sphinx is via pip:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo pip install sphinx
|
||||
|
||||
Additionally, you will also need a Sphinx extension for numbering figures. The
|
||||
Numfig_ package can be installed directly with pip:
|
||||
`Numfig <http://openmc.readthedocs.io/en/latest/>`_ package can be installed
|
||||
directly with pip:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
|
|
@ -24,7 +25,7 @@ Building Documentation as a Webpage
|
|||
-----------------------------------
|
||||
|
||||
To build the documentation as a webpage (what appears at
|
||||
http://mit-crpg.github.io/openmc), simply go to the ``docs`` directory and run:
|
||||
http://openmc.readthedocs.io), simply go to the ``docs`` directory and run:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
|
|
@ -35,20 +36,9 @@ Building Documentation as a PDF
|
|||
-------------------------------
|
||||
|
||||
To build PDF documentation, you will need to have a LaTeX distribution installed
|
||||
on your computer as well as Inkscape_, which is used to convert .svg files to
|
||||
.pdf files. Inkscape can be installed in a Debian-derivative with:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt install inkscape
|
||||
|
||||
One the pre-requisites are installed, simply go to the ``docs`` directory and
|
||||
run:
|
||||
on your computer. Once you have a LaTeX distribution installed, simply go to the
|
||||
``docs`` directory and run:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
make latexpdf
|
||||
|
||||
.. _Sphinx: http://sphinx-doc.org
|
||||
.. _Numfig: https://pypi.python.org/pypi/sphinx_numfig
|
||||
.. _Inkscape: https://inkscape.org
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue