Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commiteae95fc

Browse files
timhoffmstory645
andcommitted
DOC: Clarify the difference between document and section references
Co-authored-by: hannah <story645@gmail.com>
1 parent0dc8c2f commiteae95fc

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

‎doc/devel/document.rst

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,24 @@ nor the ````literal```` role:
194194
Refer to other documents and sections
195195
-------------------------------------
196196

197-
Sphinx_allows internalreferences_ between documents.
197+
Sphinx_supports internalreferences_:
198198

199-
Documents can be linked with the ``:doc:`` directive:
199+
========== =============== ===========================================
200+
Role Links target Representation in rendered HTML
201+
========== =============== ===========================================
202+
|doc-dir|_ document link to a page
203+
|ref-dir|_ reference label link to an anchor associated with a heading
204+
========== =============== ===========================================
205+
206+
.. The following is a hack to have a link with literal formatting
207+
See https://stackoverflow.com/a/4836544
208+
209+
.. |doc-dir|replace:: ``:doc:``
210+
.. _doc-dir:https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-doc
211+
.. |ref-dir|replace:: ``:ref:``
212+
.. _ref-dir:https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-ref
213+
214+
Examples:
200215

201216
..code-block::rst
202217
@@ -214,7 +229,7 @@ will render as:
214229

215230
See the example:doc:`/gallery/lines_bars_and_markers/simple_plot`
216231

217-
Sections can also be given referencenames. For instance from the
232+
Sections can also be given referencelabels. For instance from the
218233
:doc:`/users/installing/index` link:
219234

220235
..code-block::rst

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp