\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
ref_example¶
View page sourceSphinx ref Role Example¶
This example is similar to the heading_example except that it uses multiple lines for the targets under Links below.
A Level One Long Heading¶
Text at level one.
A Level Two Long Heading¶
Text at level two.
A Level Three Long Heading¶
Text at level three.
A Level Four Long Heading¶
Text at level four.
Links¶
The links below have newlines in their targets:
Newlines In Sphinx :ref: Targets¶
The file below demonstrates
using newlines in sphinx :ref:
targets.
This Example File¶
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: Bradley M. Bell <bradbell@seanet.com>
# SPDX-FileContributor: 2020-23 Bradley M. Bell
# ----------------------------------------------------------------------------
{xrst_begin ref_example}
Sphinx ref Role Example
#######################
This example is similar to the :ref:`heading_example-name`
except that it uses multiple lines for the
targets under :ref:`ref_example@Links` below.
A Level One Long Heading
************************
Text at level one.
A Level Two Long Heading
========================
Text at level two.
A Level Three Long Heading
--------------------------
Text at level three.
A Level Four Long Heading
.........................
Text at level four.
Links
*****
The links below have newlines in their targets:
#. :ref:`level one<
ref_example@A Level One Long Heading
>`
#. :ref:`level two<
ref_example@A Level One Long Heading@A Level Two Long Heading
>`
#. :ref:`level three<
ref_example
@A Level One Long Heading
@A Level Two Long Heading
@A Level Three Long Heading
>`
#. :ref:`
ref_example
@A Level One Long Heading
@A Level Two Long Heading
@A Level Three Long Heading
@A Level Four Long Heading
`
Newlines In Sphinx :ref: Targets
********************************
The file below demonstrates
using newlines in sphinx ``:ref:`` targets.
This Example File
*****************
{xrst_literal}
{xrst_end ref_example}