@@ -187,9 +187,24 @@ nor the ````literal```` role:
187187Referring to other documents and sections
188188-----------------------------------------
189189
190- Sphinx _ allows internal references _ between documents.
190+ Sphinx _ supports internal references _:
191191
192- Documents can be linked with the ``:doc: `` directive:
192+ ========== =============== ===========================================
193+ Role Links target Representation in rendered HTML
194+ ========== =============== ===========================================
195+ |doc-dir |_ document link to a page
196+ |ref-dir |_ reference label link to an anchor associated with a heading
197+ ========== =============== ===========================================
198+
199+ .. The following is a hack to have a link with literal formatting
200+ See https://stackoverflow.com/a/4836544
201+
202+ .. |doc-dir | replace :: ``:doc: ``
203+ .. _doc-dir : https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-doc
204+ .. |ref-dir | replace :: ``:ref: ``
205+ .. _ref-dir : https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-ref
206+
207+ Examples:
193208
194209.. code-block :: rst
195210
@@ -207,7 +222,7 @@ will render as:
207222
208223 See the example :doc: `/gallery/lines_bars_and_markers/simple_plot `
209224
210- Sections can also be given reference names . For instance from the
225+ Sections can also be given reference labels . For instance from the
211226:doc: `/users/installing/index ` link:
212227
213228.. code-block :: rst
0 commit comments