Ability to generate PDF documentation.

This commit is contained in:
Paul Romano 2014-01-08 23:15:59 -05:00
parent 736109fdf9
commit a3726724ec
23 changed files with 35 additions and 18 deletions

1
.gitignore vendored
View file

@ -19,6 +19,7 @@ src/openmc
# Documentation builds
docs/build
docs/source/_images/*.pdf
# xml-fortran reader
src/xml-fortran/xmlreader

View file

@ -6,13 +6,19 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
IMAGEDIR = source/_images
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
# SVG to PDF conversion
SVG2PDF = inkscape
PDFS = $(patsubst %.svg,%.pdf,$(wildcard $(IMAGEDIR)/*.svg))
.PHONY: help images clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
help:
@echo "Please use \`make <target>' where <target> is one of"
@ -33,8 +39,16 @@ help:
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
# Pattern rule for converting SVG to PDF
%.pdf: %.svg
$(SVG2PDF) -f $< -A $@
# Rule to build PDFs
images: $(PDFS)
clean:
-rm -rf $(BUILDDIR)/*
-rm $(PDFS)
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@ -91,14 +105,14 @@ epub:
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
latex: images
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
latexpdf: images
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
make -C $(BUILDDIR)/latex all-pdf

View file

Before

Width:  |  Height:  |  Size: 278 KiB

After

Width:  |  Height:  |  Size: 278 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 460 KiB

After

Width:  |  Height:  |  Size: 460 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Before After
Before After

View file

@ -121,7 +121,7 @@ html_title = "OpenMC Documentation"
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = '../img/openmc.png'
html_logo = '_images/openmc.png'
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@ -188,6 +188,8 @@ latex_documents = [
u'Massachusetts Institute of Technology', 'manual'),
]
latex_elements = {'preamble': '\\usepackage{enumitem}\\setlistdepth{9}'}
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None

View file

@ -60,7 +60,7 @@ features and bug fixes. The general steps for contributing are as follows:
repository with the same name under your personal account. As such, you can
commit to it as you please without disrupting other developers.
.. image:: ../../img/fork.png
.. image:: ../_images/fork.png
2. Clone your fork of OpenMC and create a branch that branches off of *develop*:
@ -77,7 +77,7 @@ features and bug fixes. The general steps for contributing are as follows:
4. Issue a pull request from GitHub and select the *develop* branch of
mit-crpg/openmc as the target.
.. image:: ../../img/pullrequest.png
.. image:: ../_images/pullrequest.png
At a minimum, you should describe what the changes you've made are and why
you are making them. If the changes are related to an oustanding issue, make

View file

@ -80,7 +80,7 @@ dashed box would need to be stored on a per-nuclide basis, and the union grid
would need to be stored once. This method is also referred to as *double
indexing* and is available as an option in Serpent (see paper by Leppanen_).
.. figure:: ../../img/uniongrid.svg
.. figure:: ../_images/uniongrid.*
:width: 600px
:align: center
:figclass: align-center

View file

@ -45,7 +45,7 @@ surface by a combination of the unique ID of the surface and a positive/negative
sign. The following illustration shows an example of an ellipse with unique ID 1
dividing space into two half-spaces.
.. figure:: ../../img/halfspace.svg
.. figure:: ../_images/halfspace.*
:align: center
:figclass: align-center
@ -60,7 +60,7 @@ half-space references whose intersection defines the region. The region is then
assigned a material defined elsewhere. The following illustration shows an
example of a cell defined as the intersection of an ellipse and two planes.
.. figure:: ../../img/union.svg
.. figure:: ../_images/union.*
:align: center
:figclass: align-center

View file

@ -65,7 +65,7 @@ in the case of an eigenvalue calculation). This idea is illustrated in
.. _figure-master-slave:
.. figure:: ../../img/master-slave.png
.. figure:: ../_images/master-slave.png
:align: center
:figclass: align-center
@ -122,7 +122,7 @@ needed. This concept is illustrated in :ref:`Figure 2
.. _figure-nearest-neighbor:
.. figure:: ../../img/nearest-neighbor.png
.. figure:: ../_images/nearest-neighbor.png
:align: center
:figclass: align-center
@ -203,7 +203,7 @@ communicated between adjacent nodes.
.. _figure-neighbor-example:
.. figure:: ../../img/nearest-neighbor-example.png
.. figure:: ../_images/nearest-neighbor-example.png
:align: center
:figclass: align-center

View file

@ -38,7 +38,7 @@ running OpenMC with the -plot or -p command-line option (See
Plotting in 2D
--------------
.. image:: ../../img/atr.png
.. image:: ../_images/atr.png
:height: 200px
After running OpenMC to obtain PPM files, images should be saved to another
@ -58,7 +58,7 @@ Ubuntu: ``sudo apt-get install imagemagick``). Images are then converted like:
Plotting in 3D
--------------
.. image:: ../../img/3dgeomplot.png
.. image:: ../_images/3dgeomplot.png
:height: 200px
The binary VOXEL files output by OpenMC can not be viewed directly by any
@ -162,7 +162,7 @@ tasks will be described here in the following sections.
Plotting in 2D
--------------
.. image:: ../../img/plotmeshtally.png
.. image:: ../_images/plotmeshtally.png
:height: 200px
For simple viewing of 2D slices of a mesh plot, the utility plot_mesh_tally.py
@ -170,7 +170,7 @@ is provided. This utility provides an interactive GUI to explore and plot
mesh tallies for any scores and filter bins. It requires statepoint.py, as well
as `PyQt <http://www.riverbankcomputing.com/software/pyqt>`_.
.. image:: ../../img/fluxplot.png
.. image:: ../_images/fluxplot.png
:height: 200px
Alternatively, the user can write their own Python script to manipulate the data
@ -249,7 +249,7 @@ two heatmaps in the previous figure.
Plotting in 3D
--------------
.. image:: ../../img/3dcore.png
.. image:: ../_images/3dcore.png
:height: 200px
As with 3D plots of the geometry, meshtally data needs to be put into a standard
@ -357,7 +357,7 @@ and dumped to MATLAB in one step.
Particle Track Visualization
----------------------------
.. image:: ../../img/Tracks.png
.. image:: ../_images/Tracks.png
:height: 200px
OpenMC can dump particle tracks—the position of particles as they are