annaR <anna.romito <at> gmail.com> writes:

> 
> Hello folks:
> 
> I use Sphinx to generate latex and html output from reST files. One of
> our
> users pointed out that the figures are numbered in latex however they
> are not numbered in HTML.
> How can I refer to the figure with the number  ?
> 
> I am using Sphinx 0.6.5
> 
> If you need any info please feel free to ask.
> 
> thanks,
> AnnaR
> 

I found an extension for this. This solves exactly what we needed.

https://bitbucket.org/arjones6/sphinx-numfig/wiki/Home

arjones6 / sphinx-numfig

An extension for sphinx that adds the ability to reference figures by number or
page. Also can be used to modify figure captions in html rendering to include a
figure number.

: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.

Note: The :page: does not display correctly in HTML. But, I didn't need that
feature (though I posted an issue since I might like it later).

Kathy


-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to