Debian Codegraph @

test/functional/input/data/footnote-references.rst

raw
1 Test features of rST footnotes
2 ==============================
3
4 *Numbered* footnotes [#exi]_ [#]_ [4]_ may be referenced more than
5 once and also via hyperlink references:
6
7
8 *Symbol* footnotes [*]_ do not have a reference name.
9 They can only be referenced once and only with a footnote-reference.
10
11 .. table:: Numbered footnotes [#tab]_
12 :width: 100%
13
14 ======================== ===============================================
15 autonumber label [#exi]_ Reference name is the *label* (exi_),
16 not the number (both ``1_`` and ``[1]_`` fail).
17
18 auto-numbered [3]_ Reference name is the Docutils-assigned
19 number (3_). [#unstable]_ [#latex]_
20
21 manually numbered [4]_ Reference name is the specified number
22 (4_). [#latex]_
23 ======================== ===============================================
24
25 .. [4] manually numbered footnote
26 .. [#exi] autonumber-label footnote
27 .. [#] auto-numbered footnote (skipping 2)
28 .. [*] auto-symbol footnote [#]_ [*]_
29 .. [#] auto-numbered footnote referenced from the first auto-symbol footnote
30 (skipping 4_ and 5_)
31 .. [*] auto-symbol footnote referenced from the first auto-symbol footnote
32 .. [#sec] autonumber-label footnote referenced from a section title
33 .. [#tab] autonumber-label footnote referenced from a table title
34 (missing with "latex-footnotes").
35 .. [#unstable]
36 .. caution:: The assigned number may change if numbered
37 footnotes are added, removed or rearranged.
38 .. [#latex] Numbers assigned by LaTeX may differ from the
39 numbers assigned manually or by Docutils.
40 .. [#] auto-number footnote referenced from admonition title
41 .. [*] auto-symbol footnote referenced from admonition text
42
43
44 Name Conflicts [#sec]_
45 ======================
46
47 4
48 -
49
50 An *implicit* target with conflicting refname (like this section and the
51 next) is overwritten by manually numbered footnotes [4]_ and footnotes
52 with autonumber-label [#exi]_. An INFO is generated.
53
54 Hyperlink references to 4_ and exi_ point to the footnotes, not the
55 sections.
56
57 exi
58 ---
59
60 Numbers of manually numbered footnotes and autonumber-labels
61 cannot be used in *explicit* targets:
62 ``_`4``` and ``_`exi``` would lead to a "duplicate target name" ERROR .
63
64 The markup characters for auto-labeled footnotes "_`*`" and "_`#`" and
65 the symbols selected by auto-symbol footnotes "_`†`" do not become
66 reference names. They can be used in other hyperref targets allowing
67 links to `*`_, `#`_ and `†`_.
68
69 5
70 -
71
72 Both, explicit and implicit targets with a number as reference name (e.g.
73 the inline target "_`2`" and the section title "5" above) cause a gap in
74 footnote auto-numbering. [#latex]_ The number can be used in a
75 footnote-reference although it does not refer to a footnote! [5]_ [2]_
76
77 .. admonition:: TODO [#]_
78
79 Emit a warning if a footnote-reference refers to something else? [*]_