8000 Merge pull request #27945 from timhoffm/doc-cross-ref · matplotlib/matplotlib@9dd9cb4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9dd9cb4

Browse files
authored
Merge pull request #27945 from timhoffm/doc-cross-ref
DOC: Explain lead 8000 ing dot in object references
2 parents c74365f + 2b5bb79 commit 9dd9cb4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

doc/devel/document.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,10 @@ target is unambiguous you can simply leave them out:
317317
318318
`.LineCollection`
319319
320-
and the link still works: `.LineCollection`.
320+
and the link still works: `.LineCollection`. Note that you should typically include
321+
the leading dot. It tells Sphinx to look for the given name in the whole project.
322+
See also the explanation at `Sphinx: Cross-referencing Python objects
323+
<https://www.sphinx-doc.org/en/master/usage/domains/python.html#cross-referencing-python-objects>`_.
321324

322325
If there are multiple code elements with the same name (e.g. ``plot()`` is a
323326
method in multiple classes), you'll have to extend the definition:

0 commit comments

Comments
 (0)
0