@@ -194,9 +194,24 @@ nor the ````literal```` role:
194194Refer to other documents and sections
195195-------------------------------------
196196
197- Sphinx _ allows internal references _ between documents.
197+ Sphinx _ supports internal references _:
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 reference names . For instance from the
232+ Sections can also be given reference labels . For instance from the
218233:doc: `/users/installing/index ` link:
219234
220235.. code-block :: rst
0 commit comments