views:

48

answers:

1

Hi,

When writing RST that will be processed with Sphinx, I can't get Sphinx LaTeX output to use figure numbers when referencing figures. For instance, this code:

The lemmings are attacking, as can be seen in :ref:`figlem`.

.. _figlem:

.. figure:: _static/lemming_invasion.* 

   They're coming!

Will be converted into this:

The lemmings are attacking, as can be seen in They're coming!

/image goes here/

Figure 1.1: They're coming!

But what I want is the "standard" LaTeX way of referencing figures, like this:

The lemmings are attacking, as can be seen in Figure 1.1

How do I achieve this? The code I'm currently using is what the Sphinx manual recommends, but it doesn't produce the output I want.

A: 

I think referencing Figures is not yet implemented in reST, but here is workaround http://article.gmane.org/gmane.text.docutils.user/5623 that gets you closer.

Matti Pastell
Sadly, this doesn't seem to work with Sphinx. Thanks for trying though.
Lucas