@@ -52,6 +52,22 @@ language, this will not take too long.
52
52
Documentation <https://docutils.sourceforge.io/rst.html> `_.
53
53
54
54
55
+ Use of whitespace
56
+ -----------------
57
+
58
+ All reST files use an indentation of 3 spaces; no tabs are allowed. The
59
+ maximum line length is 80 characters for normal text, but tables, deeply
60
+ indented code samples and long links may extend beyond that. Code example
61
+ bodies should use normal Python 4-space indentation.
62
+
63
+ Make use of multiple blank lines where applicable to clarify the structure of
64
+ the reST file. Extra blank lines help group sections together to make the
65
+ organization of the file clearer.
66
+
67
+ A sentence-ending period may be followed by one or two spaces. While reST
68
+ ignores the second space, it is customarily put in by some users, for example
69
+ to aid Emacs' auto-fill mode.
70
+
55
71
Paragraphs
56
72
----------
57
73
@@ -289,6 +305,28 @@ There are some problems one commonly runs into while authoring reST documents:
289
305
separated from the surrounding text by non-word characters, you have to use
290
306
an escaped space to get around that.
291
307
308
+
309
+ Typographic conventions
310
+ =======================
311
+
312
+ Big *O * notation
313
+ ----------------
314
+
315
+ Big *O * notation is used to describe the performance of algorithms.
316
+
317
+ Use italics for the big *O * and variables. For example:
318
+
319
+ ======================== ====================
320
+ reStructuredText Rendered
321
+ ======================== ====================
322
+ ``*O*\ (1) `` *O *\ (1)
323
+ ``*O*\ (log *n*) `` *O *\ (log *n *)
324
+ ``*O*\ (*n*) `` *O *\ (*n *)
325
+ ``*O*\ (*n* log *n*) `` *O *\ (*n * log *n *)
326
+ ``*O*\ (*n*\ :sup:`2`) `` *O *\ (*n *\ :sup: `2`)
327
+ ======================== ====================
328
+
329
+
292
330
.. _additional-markup-constructs :
293
331
294
332
Additional markup constructs
0 commit comments