Re: A small detail on the syntax of field list markers
"Karl O. Pinc" <[email protected]> Sun, 6 Apr 2025 13:47:11 -0500
| Newsgroups | gmane.text.docutils.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 6 Apr 2025 15:26:24 -0000 (UTC) Guenter Milde via Docutils-develop <[email protected]> wrote: > The rST escaping rules are a bit more complex: > > * “Escaping” backslash characters are represented by NULL > characters in the Document Tree and removed from the output document > by the Docutils writers. > > * Escaped non-white characters are prevented from playing a role in > any markup interpretation. The escaped character represents the > character itself. (A literal backslash can be specified by two > backslashes in a row – the first backslash escapes the second.) > > * Escaped whitespace characters are removed from the output document > together with the escaping backslash. This allows for > character-level inline markup. > > In "URI context", backslash-escaped whitespace represents a > single space. > > --- > https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#escaping-mechanism > The third rule provides for character level inline markup, e.g., > "re\ *Structured*\ text" or hyper\ `links`_ to a part of a word. > > .. _links: example.org/word > > The escape-character and space are removed by the writer, i.e. the > space char is present and interpreted as space char when parsing. FYI, a more universal example is adding links to footnotes at the end of a sentence, without an extra space between the period and the footnote number/link. A footnoted sentence.\ [#f1]_ .. rubric:: Footnotes .. [#f1] Text of the footnote. Then you get: A footnoted sentence.1 Where the "1" is superscripted and hyperlinked. (If you're looking for an example to include in the docs.) Regards, Karl <[email protected]> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein _______________________________________________ Docutils-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/docutils-develop Please use "Reply All" to reply to the list.