Indirect hyperlinks

For indirect hyperlinks, the hyperlink target itself contains a hyperlink reference. Indirect hyperlinks thus enable the linking of explicit hyperlink targets.

Hyperlink reference

Description

The hyperlink reference consists of a reference name followed by an underscore:

reference-name_

Phrase references must be specified in back quotes:

`reference name`_

(See also: Reference names)

Start and end characters

  • No start character, end character = "_"
  • Start character = "`", end character = "`_" (phrase references)

(See also: Inline markup)

Hyperlink target

Description

The hyperlink target consists of an explicit markup start (".. "), an underscore, the reference name, a colon, spaces and a link block:

.. _reference-name: link-block

A phrase reference in the hyperlink target can optionally be included in back quotes:

.. _`reference name`: link-block
.. _reference name: link-block

(See also: Explicit markup blocks, Reference names)

Principle

+-----+-----------------+
|".. "|"_"name":" link  |
+-----+block            |
      |                 |
      +-----------------+

Properties

  • Indirect hyperlink targets have a hyperlink reference in their link block.
  • As with external hyperlink targets, the link block of an indirect hyperlink target can start in the same line as the explicit markup block or in the next line.

For example, the following indirect hyperlink targets are equivalent:

.. _one-liner: `A HYPERLINK`_
.. _entirely-below:
   `a    hyperlink`_
.. _split: `A
   Hyperlink`_

If the reference name contains colons:

  • the phrase must be enclosed in back quotes in the link block of the hyperlink target
`Beckhoff Support:`_

* worldwide support
* design, programming and commissioning of complex automation systems
* training program for Beckhoff system components 

.. _`Beckhoff Support:`: support@beckhoff.com
  • or the colon(s) must be backslashed:
`Beckhoff Support:`_

* worldwide support
* design, programming and commissioning of complex automation systems
* training program for Beckhoff system components 

.. _Beckhoff Support\:: support@beckhoff.com

Samples

(In sample project: B_DocuElements\Hyperlinks\FB_Libdoc_IndirectHyperlinks)

Indirect references to an internal reference target

In the following sample, the hyperlink target .. _one indirectly refers to target .. _two and the target .. _two indirectly refers to target .. _three, an internal reference target. Actually, all three objectives refer to the same target (the same paragraph):

(*
This hyperlink points to target one_ and indirect to target three.

.. _one: two_
.. _two: three_
.. _three:

The hyperlink targets above point to this paragraph.
*)

Indirect hyperlinks 1:

Indirect references to an internal reference target

In the following sample, the target .. _Beckhoff indirectly refers to the target .. _Beckhoff Information System, an external reference target.

(*
The `Beckhoff Information System`_ is a reference source for Beckhoff_ products

.. _Beckhoff: `Beckhoff Information System`_

.. _Beckhoff Information System: https://infosys.beckhoff.de/
*)

Indirect hyperlinks 2:

It is also possible to insert an alias directly into the hyperlink target (see Embedded URIs and aliases).