@@ -475,68 +475,71 @@ Footnotes containing the URLs from external targets will be generated
475
475
automatically at the end of the References section of the PEP, along
476
476
with footnote references linking the reference text to the footnotes.
477
477
478
- Text of the form "PEP x" or "RFC x" (where "x" is a number) will be
479
- linked automatically to the appropriate URLs.
478
+ To refer to PEPs or RFCs, always use the ``:pep: `` and ``:rfc: `` roles,
479
+ never hard-coded URLs.
480
+ For example:
481
+
482
+ .. code-block :: rst
483
+
484
+ See :pep:`1` for more information on how to write a PEP,
485
+ and :pep:`the Hyperlink section of PEP 12 <12#hyperlinks>` for how to link.
486
+
487
+ This renders as:
488
+
489
+ See :pep: `1 ` for more information on how to write a PEP,
490
+ and :pep: `the Hyperlink section of PEP 12 <12#hyperlinks >` for how to link.
491
+
492
+ PEP numbers in the text are never padded, and there is a space (not a dash)
493
+ between "PEP" or "RFC" and the number; the above roles will take care of
494
+ that for you.
480
495
481
496
482
497
Footnotes
483
498
---------
484
499
485
500
Footnote references consist of a left square bracket, a number, a
486
- right square bracket, and a trailing underscore::
501
+ right square bracket, and a trailing underscore
502
+
503
+ .. code-block :: rst
487
504
488
505
This sentence ends with a footnote reference [1]_.
489
506
490
507
Whitespace must precede the footnote reference. Leave a space between
491
508
the footnote reference and the preceding word.
492
509
493
- When referring to another PEP, include the PEP number in the body
494
- text, such as "PEP 1". The title may optionally appear. Add a
495
- footnote reference following the title. For example::
496
-
497
- Refer to PEP 1 [2]_ for more information.
498
-
499
- Add a footnote that includes the PEP's title and author. It may
500
- optionally include the explicit URL on a separate line, but only in
501
- the References section. Footnotes begin with ".. " (the explicit
510
+ Footnotes begin with ".. " (the explicit
502
511
markup start), followed by the footnote marker (no underscores),
503
- followed by the footnote body. For example::
512
+ followed by the footnote body. For example:
513
+
514
+ .. code-block :: rst
504
515
505
516
References
506
517
==========
507
518
508
- .. [2] PEP 1, "PEP Purpose and Guidelines", Warsaw, Hylton
509
- (http://www.python.org/dev/peps/pep-0001)
519
+ .. [1] Note that the footnote reference is a numbered one.
510
520
511
- If you decide to provide an explicit URL for a PEP, please use this as
512
- the URL template::
513
-
514
- http://www.python.org/dev/peps/pep-xxxx
515
-
516
- PEP numbers in URLs must be padded with zeros from the left, so as to
517
- be exactly 4 characters wide; however, PEP numbers in the text are
518
- never padded.
521
+ .. [2] Donald Knuth's *The TeXBook*, pages 195 and 196.
519
522
520
523
During the course of developing your PEP, you may have to add, remove,
521
524
and rearrange footnote references, possibly resulting in mismatched
522
525
references, obsolete footnotes, and confusion. Auto-numbered
523
526
footnotes allow more freedom. Instead of a number, use a label of the
524
527
form "#word", where "word" is a mnemonic consisting of alphanumerics
525
528
plus internal hyphens, underscores, and periods (no whitespace or
526
- other characters are allowed). For example::
529
+ other characters are allowed). For example:
530
+
531
+ .. code-block :: rst
527
532
528
- Refer to PEP 1 [#PEP-1 ]_ for more information.
533
+ Refer to The TeXBook [#TeXBook ]_ for more information.
529
534
530
535
References
531
536
==========
532
537
533
- .. [#PEP-1] PEP 1, "PEP Purpose and Guidelines", Warsaw, Hylton
538
+ .. [#TeXBook] Donald Knuth's *The TeXBook*, pages 195 and 196.
534
539
535
- http://www.python.org/dev/peps/pep-0001
536
540
537
541
Footnotes and footnote references will be numbered automatically, and
538
- the numbers will always match. Once a PEP is finalized, auto-numbered
539
- labels should be replaced by numbers for simplicity.
542
+ the numbers will always match.
540
543
541
544
542
545
Images
0 commit comments