On 2013-01-28, Alex Reinhart wrote:

> Thanks, I got that working. This spawns an additional question: when I 
> provide the :name: attribute to my custom directive, I can only reference 
> the directive with the :ref:`text <name>` syntax, since the directive has 
> no title. However, I'd like to be able to give a default title, like 
> "Exercise 4", so the following might work:

> .. exercise::
>  :name: pythagoras

>   Prove the following theorem...

> In :ref:`pythagoras`, you demonstrated that...

> and I'd see a link to "Exercise 4" or whatever it might be, just as LaTeX 
> would fill in the exercise's number. Is there a way to achieve this? There 
> must be, since the figure directive can do it.

I think you must modify the "ref" role for this. As "ref" is a Sphinx
addition unknown to Docutils, I don't know the details.

Günter

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to