With numfig you can have numbered figures in your Sphinx documents and refer to them by number.
This originated originated from
https://bitbucket.org/arjones6/sphinx-numfig/wiki/Home.
The changes have been to get it to work with html, to namespace the configuration parameters, and to give more descriptive names to various methods.
In your project's conf.py, add numfig to your sphinx extensions, and set the values of your configuration parameters as shown in the fragment below.
extensions = ['sphinx.ext.mathjax', 'sphinx.ext.ifconfig', 'sphinx.ext.numfig']
# numfig:
# numfig_number_figures = True
# numfig_figure_caption_prefix = "Figure"
Example of use:
A visualization of this is shown in :num:`Fig. #emplanewavesetupwin`.
.. _emPlaneWaveSetupWin:
.. figure:: emPlaneWaveSetupWin.png
:scale: 100 %
:alt: image 1
Setup window for the Electromagnetic Plane Wave example.
The label (_emPlaneWaveSetupWin:) has an underscore prepended and a colon appended.
The reference (#emplanewavesetupwin) is a translation of the label to lower case with all dashes converted to underscores with a hash sign prepended.
The figure caption must be separated from the figure by an empty line.
The wiki uses Markdown syntax.