From 3d318ee08ac1230c73668b039283ed751c5503c3 Mon Sep 17 00:00:00 2001 From: grubert Date: Sun, 14 Jul 2024 20:53:10 +0000 Subject: [PATCH] add more reference tests git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@9773 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- sandbox/manpage-writer/expected/refs.man | 139 +++++++++++++++++++++++++++++++ sandbox/manpage-writer/input/refs.txt | 118 ++++++++++++++++++++++++++ 2 files changed, 257 insertions(+) create mode 100644 sandbox/manpage-writer/expected/refs.man create mode 100644 sandbox/manpage-writer/input/refs.txt diff --git a/sandbox/manpage-writer/expected/refs.man b/sandbox/manpage-writer/expected/refs.man new file mode 100644 index 000000000..35cdc6bbb --- /dev/null +++ b/sandbox/manpage-writer/expected/refs.man @@ -0,0 +1,139 @@ +.\" Man page generated from reStructuredText by manpage writer +.\" from docutils 0.22b.dev. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "" "" "" "" +.SH Name + \- +from quickref.html +.SH Explicit Markup +.SS Footnotes +.sp +Footnote references, like [5]\&. +Note that footnotes may get +rearranged, e.g., to the bottom of +the \(dqpage\(dq. +.IP [5] 5 +A numerical footnote. Note +there\(aqs no colon after the \fB]\fP\&. + +.sp +.ce +---- + +.ce 0 +.sp +.sp +Autonumbered footnotes are +possible, like using [1] and [2]\&. +.IP [1] 5 +This is the first one. +.IP [2] 5 +This is the second one. +.sp +They may be assigned \(aqautonumber +labels\(aq \- for instance, +[4] and [3]\&. +.IP [3] 5 +a.k.a. third +.IP [4] 5 +a.k.a. fourth + +.sp +.ce +---- + +.ce 0 +.sp +.sp +Auto\-symbol footnotes are also +possible, like this: [*] and [\(dg]\&. +.IP [*] 5 +This is the first one. +.IP [\(dg] 5 +This is the second one. +.SS Citations +.sp +Citation references, like [CIT2002]\&. +Note that citations may get +rearranged, e.g., to the bottom of +the \(dqpage\(dq. +.IP [CIT2002] 5 +A citation +(as often used in journals). +.sp +Citation labels contain alphanumerics, +underlines, hyphens and fullstops. +Case is not significant. +.sp +Given a citation like [this], one +can also refer to it like this\&. +.IP [this] 5 +here. +.SS External Hyperlink Targets +.sp +External hyperlinks, like Python +\&. +.sp +embedded External hyperlinks, like Python +\&. +.SS Internal Hyperlink Targets +.sp +Internal cross\-references, like example\&. +.sp +This is an example cross\-reference target. +.SS Indirect Hyperlink Targets +.sp +Python + is my favourite +programming language +\&. +.SH Titles are targets, too +.sp +Implicit references, like Titles are +targets, too\&. +.SH and +.sp +See the Python + home page for info. +.sp +Write to me + with your questions. +.\" deduplicate _Python: https://www.python.org +. +.SS URIs with known schemes +.sp + + + + +.SS Standalone email addresses +.sp +like +.\" End of generated man page. diff --git a/sandbox/manpage-writer/input/refs.txt b/sandbox/manpage-writer/input/refs.txt new file mode 100644 index 000000000..69d9bb9ee --- /dev/null +++ b/sandbox/manpage-writer/input/refs.txt @@ -0,0 +1,118 @@ +from quickref.html + +Explicit Markup +=============== + +Footnotes +--------- + +Footnote references, like [5]_. +Note that footnotes may get +rearranged, e.g., to the bottom of +the "page". + +.. [5] A numerical footnote. Note + there's no colon after the ``]``. + +---- + +Autonumbered footnotes are +possible, like using [#]_ and [#]_. + +.. [#] This is the first one. +.. [#] This is the second one. + +They may be assigned 'autonumber +labels' - for instance, +[#fourth]_ and [#third]_. + +.. [#third] a.k.a. third_ + +.. [#fourth] a.k.a. fourth_ + +---- + +Auto-symbol footnotes are also +possible, like this: [*]_ and [*]_. + +.. [*] This is the first one. +.. [*] This is the second one. + +Citations +--------- + +Citation references, like [CIT2002]_. +Note that citations may get +rearranged, e.g., to the bottom of +the "page". + +.. [CIT2002] A citation + (as often used in journals). + +Citation labels contain alphanumerics, +underlines, hyphens and fullstops. +Case is not significant. + +Given a citation like [this]_, one +can also refer to it like this_. + +.. [this] here. + +External Hyperlink Targets +-------------------------- + +External hyperlinks, like Python_. + +.. _Python: https://www.python.org/ + +embedded External hyperlinks, like `Python +`_. + +Internal Hyperlink Targets +-------------------------- + +Internal cross-references, like example_. + +.. _example: + +This is an example cross-reference target. + +Indirect Hyperlink Targets +-------------------------- + +Python_ is `my favourite +programming language`__. + +.. _Python: https://www.python.org/ + +__ Python_ + +Titles are targets, too +======================= + +Implicit references, like `Titles are +targets, too`_. + +and +=== + +See the Python_ home page for info. + +`Write to me`_ with your questions. + +.. deduplicate _Python: https://www.python.org +.. _Write to me: jdoe@example.com + +URIs with known schemes +----------------------- + +tel:+48-816-555-1212 +urn:isbn:0-486-27557-4 +news:comp.infosystems.www.servers.unix +https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top + +Standalone email addresses +-------------------------- + +like someone@somewhere.com + -- 2.11.4.GIT