Wiki

Clone wiki

sphinx-numfig / Home

numfig

Numfig provides the following configuration variables:

variabledescription
number_figuresIf True, will modify figure captions in html output to include a figure number.
figure_caption_prefixSet to a string that will be included before the figure number for html figure captions. Defaults to "Figure"

Numfig also defines the following roles, which can be used similarly to the :ref: role.

roledescription
:num:Provides a link to the referenced figure, with the text of the link being the figure number instead of the figure caption. To include more than just the figure number in the link, use the role as follows :num:`figure #reftarget`. Provided that reftarget refers to the 3rd figure, this would be replaced with a link that says "figure 3".
:page:The reference will be replaced by the page number the referenced figure occurs on. This only works with latex output and is ignored for other outputs.

Example usage:

See :num:`figure #example-fig` on page :page:`example-fig` for the figure labeled :ref:`example-fig`.

.. _example-fig:

.. figure:: example_figure.png

    Example figure

Updated