title: How would I cross-reference a function generated by autodoc in Sphinx?
body: <p>I am using the <em>Sphinx</em> <code>autodoc</code> feature to generate documentation based on the docstrings of my Python library.</p>
  
  <p>The syntax for cross referencing is found <a href="http://sphinx-doc.org/markup/inline.html#ref-role">here</a></p>
  
  <p>A label must precede the section in order to allow that section to be referenced from other areas of the documentation.</p>
  
  <p>What I have is a .rst (ReStructeredText) file for one of my classes. It uses</p>
  
  <pre><code>.. autoclass:: classname
      :members:
  </code></pre>
  
  <p>To generate documentation for the class.</p>
  
  <p>My question is, how would I reference the auto-generated methods of the class from another .rst document in the documentation? If I try to place a label within the method's docstring, Sphinx complains. If I try to place a label before the method heading, Sphinx doesn't recognize it.</p>
  
  <p>Is there a simple way to do this, or will I have to explicitly write in my class file the method name and precede that with a label?</p>
  
  <p>Here is an example a reference within the [Python documentation<a href="http://docs.python.org/2.7/library/textwrap.html#textwrap.TextWrapper.wrap">2</a> doing what I need (I am assuming it used the autodoc feature, though I don't know for sure)</p>