When building the sphinx documentation with HTML, the figure numbers appear in a global scope, i.e. the figures of a given page start with say Figure 42 although Figure 42 is the first figure on that page and all the other figures before appear on other pages. While this is definitely desirable for Latex, it is somewhat strange in HTML.
I am using sphinx 1.1 with numfig as proposed in Referencing figures with numbers in Sphinx and reStructuredText, in particular the pip package sphinx_numfig. Python version is 2.7 but I guess that doesn't matter.
How can I reset the figure number per rst file but only when the documentation is generated as HTML?