[Python-checkins] r56694 - in doctools/trunk: Doc-26/ACKS Doc-26/documenting/rest.rst Doc-3k/ACKS Doc-3k/documenting/rest.rst sphinx/environment.py
georg.brandl
python-checkins at python.org
Fri Aug 3 10:15:50 CEST 2007
Author: georg.brandl
Date: Fri Aug 3 10:15:50 2007
New Revision: 56694
Modified:
doctools/trunk/Doc-26/ACKS
doctools/trunk/Doc-26/documenting/rest.rst
doctools/trunk/Doc-3k/ACKS
doctools/trunk/Doc-3k/documenting/rest.rst
doctools/trunk/sphinx/environment.py
Log:
Disable enumerated lists introduced by alphabetic or roman numerals.
Modified: doctools/trunk/Doc-26/ACKS
==============================================================================
--- doctools/trunk/Doc-26/ACKS (original)
+++ doctools/trunk/Doc-26/ACKS Fri Aug 3 10:15:50 2007
@@ -15,7 +15,7 @@
* Steve Alexander
* Jim Ahlstrom
* Fred Allen
-* \A. Amoroso
+* A. Amoroso
* Pehr Anderson
* Oliver Andrich
* Jesús Cea Avión
@@ -40,7 +40,7 @@
* Jeremy Craven
* Andrew Dalke
* Ben Darnell
-* \L. Peter Deutsch
+* L. Peter Deutsch
* Robert Donohue
* Fred L. Drake, Jr.
* Jeff Epler
Modified: doctools/trunk/Doc-26/documenting/rest.rst
==============================================================================
--- doctools/trunk/Doc-26/documenting/rest.rst (original)
+++ doctools/trunk/Doc-26/documenting/rest.rst Fri Aug 3 10:15:50 2007
@@ -63,9 +63,19 @@
* It has two items, the second
item uses two lines.
+ 1. This is a numbered list.
+ 2. It has two items too.
+
#. This is a numbered list.
#. It has two items too.
+Note that Sphinx disables the use of enumerated lists introduced by alphabetic
+or roman numerals, such as ::
+
+ A. First item
+ B. Second item
+
+
Nested lists are possible, but be aware that they must be separated from the
parent list items by blank lines::
@@ -210,12 +220,14 @@
.. [#] Text of the first footnote.
.. [#] Text of the second footnote.
+You can also explicitly number the footnotes for better context.
+
Comments
--------
Every explicit markup block which isn't a valid markup construct (like the
-footnotes above) is regared as a comment.
+footnotes above) is regarded as a comment.
Source encoding
@@ -229,4 +241,13 @@
documents written from them will be in that encoding as well.
-XXX: Gotchas
+Gotchas
+-------
+
+There are some problems one commonly runs into while authoring reST documents:
+
+* **Separation of inline markup:** As said above, inline markup spans must be
+ separated from the surrounding text by non-word characters, you have to use
+ an escaped space to get around that.
+
+.. XXX more?
\ No newline at end of file
Modified: doctools/trunk/Doc-3k/ACKS
==============================================================================
--- doctools/trunk/Doc-3k/ACKS (original)
+++ doctools/trunk/Doc-3k/ACKS Fri Aug 3 10:15:50 2007
@@ -15,7 +15,7 @@
* Steve Alexander
* Jim Ahlstrom
* Fred Allen
-* \A. Amoroso
+* A. Amoroso
* Pehr Anderson
* Oliver Andrich
* Jesús Cea Avión
@@ -40,7 +40,7 @@
* Jeremy Craven
* Andrew Dalke
* Ben Darnell
-* \L. Peter Deutsch
+* L. Peter Deutsch
* Robert Donohue
* Fred L. Drake, Jr.
* Jeff Epler
Modified: doctools/trunk/Doc-3k/documenting/rest.rst
==============================================================================
--- doctools/trunk/Doc-3k/documenting/rest.rst (original)
+++ doctools/trunk/Doc-3k/documenting/rest.rst Fri Aug 3 10:15:50 2007
@@ -63,9 +63,19 @@
* It has two items, the second
item uses two lines.
+ 1. This is a numbered list.
+ 2. It has two items too.
+
#. This is a numbered list.
#. It has two items too.
+Note that Sphinx disables the use of enumerated lists introduced by alphabetic
+or roman numerals, such as ::
+
+ A. First item
+ B. Second item
+
+
Nested lists are possible, but be aware that they must be separated from the
parent list items by blank lines::
@@ -210,12 +220,14 @@
.. [#] Text of the first footnote.
.. [#] Text of the second footnote.
+You can also explicitly number the footnotes for better context.
+
Comments
--------
Every explicit markup block which isn't a valid markup construct (like the
-footnotes above) is regared as a comment.
+footnotes above) is regarded as a comment.
Source encoding
@@ -229,4 +241,13 @@
documents written from them will be in that encoding as well.
-XXX: Gotchas
+Gotchas
+-------
+
+There are some problems one commonly runs into while authoring reST documents:
+
+* **Separation of inline markup:** As said above, inline markup spans must be
+ separated from the surrounding text by non-word characters, you have to use
+ an escaped space to get around that.
+
+.. XXX more?
\ No newline at end of file
Modified: doctools/trunk/sphinx/environment.py
==============================================================================
--- doctools/trunk/sphinx/environment.py (original)
+++ doctools/trunk/sphinx/environment.py Fri Aug 3 10:15:50 2007
@@ -30,6 +30,13 @@
from docutils.transforms.parts import ContentsFilter
from docutils.transforms.universal import FilterMessages
+# monkey-patch reST parser to disable alphabetic and roman enumerated lists
+from docutils.parsers.rst.states import Body
+Body.enum.converters['loweralpha'] = \
+ Body.enum.converters['upperalpha'] = \
+ Body.enum.converters['lowerroman'] = \
+ Body.enum.converters['upperroman'] = lambda x: None
+
from . import addnodes
from .util import get_matching_files
from .refcounting import Refcounts
More information about the Python-checkins
mailing list