0

Suppose, I have the following text:

blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 

Attributes Summary
==================
+---+----------------------------------+
| r | This is the radius of the circle |
+---+----------------------------------+
| x | The x axis of the center         |
+---+----------------------------------+
| y | The y axis of the center         |
+---+----------------------------------+

blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 

Attribute Documentation
=======================

**r** is the radius of the circle. 

blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 

**x** is the x axis of the center. 

blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 

**y** is the y axis of the center. 

blah blah blah blah blah blah blah blah 
blah blah blah blah blah blah blah blah 

Now, I want to link the r in the attribute summary to the r in the attribute documentation on the same page.

What should I write?

user366312
  • 16,949
  • 65
  • 235
  • 452
  • You should use a cross-reference. You first have to declare a given object (see the linked answer). In your `attribute summary` which is a `reST` table you'd write the cross-reference in a cell, and the declaration would be in `attribute documentation`. A popular alternative would also be to use a `reST` [table of contents](https://docutils.sourceforge.io/docs/ref/rst/directives.html#table-of-contents) on top of the file. If you see the official Python documentation they don't use Java type summaries on top of the modules. – bad_coder May 05 '21 at 08:00
  • There's also a number of threads on putting a reference inside or to a table, see [these posts](https://stackoverflow.com/search?q=%5Bpython-sphinx%5D+table+reference) – bad_coder May 05 '21 at 08:21

0 Answers0