summaryrefslogtreecommitdiff
path: root/docutils/docs
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2021-11-14 22:00:50 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2021-11-14 22:00:50 +0000
commit7beff57d0b1ebd33beab4df2bcb30bb65a18b8ef (patch)
treeb357a4fa3ab3bc02cf992aecd06f3b004fb83dca /docutils/docs
parent5cd1b7bd0a666cc250eac36d61cbeb1fb87ec288 (diff)
downloaddocutils-7beff57d0b1ebd33beab4df2bcb30bb65a18b8ef.tar.gz
Update documentation and handling of (east-asian) wide characters.
Explain the special casing for combinging and wide characters in section titles. cf. bug #433 Simplify import (we don't need to care for missing `unicodedata.east_asian_width` in Python < 2.4 any longer). git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8886 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/docs')
-rw-r--r--docutils/docs/ref/rst/restructuredtext.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/docutils/docs/ref/rst/restructuredtext.txt b/docutils/docs/ref/rst/restructuredtext.txt
index 334545b33..276f4f0ec 100644
--- a/docutils/docs/ref/rst/restructuredtext.txt
+++ b/docutils/docs/ref/rst/restructuredtext.txt
@@ -495,7 +495,7 @@ adornment: "underlines" below the title text, or underlines and
matching "overlines" above the title. An underline/overline is a
single repeated punctuation character that begins in column 1 and
forms a line extending at least as far as the right edge of the title
-text. Specifically, an underline/overline character may be any
+text. [#]_ Specifically, an underline/overline character may be any
non-alphanumeric printable 7-bit ASCII character [#]_. When an
overline is used, the length and character used must match the
underline. Underline-only adornment styles are distinct from
@@ -503,6 +503,10 @@ overline-and-underline styles that use the same character. There may
be any number of levels of section titles, although some output
formats may have limits (HTML has 6 levels).
+.. [#] The key is the visual length of the title in a mono-spaced font.
+ The adornment may need more or less characters than title, if the
+ title contains wide__ or combining__ characters.
+
.. [#] The following are all valid section title adornment
characters::
@@ -513,6 +517,9 @@ formats may have limits (HTML has 6 levels).
= - ` : . ' " ~ ^ _ * + #
+__ https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms#In_Unicode
+__ https://en.wikipedia.org/wiki/Combining_character
+
Rather than imposing a fixed number and order of section title
adornment styles, the order enforced will be the order as encountered.
The first style encountered will be an outermost title (like HTML H1),
@@ -1020,8 +1027,8 @@ Option Lists
Doctree elements: option_list_, option_list_item_, option_group_, option_,
option_string_, option_argument_, description_.
-Option lists are two-column lists of command-line options and
-descriptions, documenting a program's options. For example::
+Option lists map a program's command-line options to descriptions
+documenting them. For example::
-a Output all.
-b Output both (this description is