It works!

I've cloned the repo, put the py file to the 

/usr/share/pyshared/sphinx/ext/

and symlinked it to

/usr/lib/python2.7/dist-packages/sphinx/ext/

then have added to conf.py:

extensions = ['sphinx.ext.numfig']

# numfig:
number_figures = True
figure_caption_prefix = "Fig."

and the it numbers the figures:

See :num:`link text #exfigure`.

.. _exfigure:

.. figure:: _static/UnixFileSystem.jpg
   :width: 50%
   :alt: Unix file system
   :align: center

   Figure caption.

Two notes:

*) it doesn't work with :name:
*) one has to remove doctree before build

Thanks for posting the link.

On Thursday, August 30, 2012 11:29:20 PM UTC+4, kt-fsi wrote:
>
> Is it somehow possible to have a figure caption different form the text of 
> the link to that figure?
>
> This may also help. It is a sphinx extension. We use this to have 'Figure 
> #' display in our HTML output: (numfig extension with the role, :num: )
>
> https://bitbucket.org/arjones6/sphinx-numfig/wiki/Home
>
> Kathy
> ka...@tolbert.org <javascript:>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sphinx-dev/-/IRIvxe9WeFcJ.
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