Skip to content

Commit 78e8b34

Browse files
committed
Move markup concerns from style to markup
1 parent 3732839 commit 78e8b34

File tree

2 files changed

+40
-34
lines changed

2 files changed

+40
-34
lines changed

documentation/markup.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ language, this will not take too long.
5252
Documentation <https://docutils.sourceforge.io/rst.html>`_.
5353

5454

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 generous use of blank lines where applicable; they help group things
64+
together.
65+
66+
A sentence-ending period may be followed by one or two spaces. While reST
67+
ignores the second space, it is customarily put in by some users, for example
68+
to aid Emacs' auto-fill mode.
69+
5570
Paragraphs
5671
----------
5772

@@ -291,6 +306,28 @@ There are some problems one commonly runs into while authoring reST documents:
291306

292307
.. _additional-markup-constructs:
293308

309+
310+
Typographic conventions
311+
=======================
312+
313+
Big *O* notation
314+
----------------
315+
316+
Big *O* notation is used to describe the performance of algorithms.
317+
318+
Use italics for the big *O* and variables. For example:
319+
320+
======================== ====================
321+
reStructuredText Rendered
322+
======================== ====================
323+
``*O*\ (1)`` *O*\ (1)
324+
``*O*\ (log *n*)`` *O*\ (log *n*)
325+
``*O*\ (*n*)`` *O*\ (*n*)
326+
``*O*\ (*n* log *n*)`` *O*\ (*n* log *n*)
327+
``*O*\ (*n*\ :sup:`2`)`` *O*\ (*n*\ :sup:`2`)
328+
======================== ====================
329+
330+
294331
Additional markup constructs
295332
============================
296333

documentation/style-guide.rst

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,12 @@
44
Style guide
55
===========
66

7-
.. highlight:: rest
7+
.. highlight:: rest
88

9-
This document describes the style guide for our documentation.
9+
This page describes the linguistic style guide for our documentation.
10+
For markup details in reST files, see :ref:`markup`.
1011

1112

12-
Use of whitespace
13-
=================
14-
15-
All reST files use an indentation of 3 spaces; no tabs are allowed. The
16-
maximum line length is 80 characters for normal text, but tables, deeply
17-
indented code samples and long links may extend beyond that. Code example
18-
bodies should use normal Python 4-space indentation.
19-
20-
Make generous use of blank lines where applicable; they help group things
21-
together.
22-
23-
A sentence-ending period may be followed by one or two spaces; while reST
24-
ignores the second space, it is customarily put in by some users, for example
25-
to aid Emacs' auto-fill mode.
26-
2713
Footnotes
2814
=========
2915

@@ -264,20 +250,3 @@ errors ("I made a mistake, therefore the docs must be wrong ..."). Typically,
264250
the documentation wasn't consulted until after the error was made. It is
265251
unfortunate, but typically no documentation edit would have saved the user from
266252
making false assumptions about the language ("I was surprised by ...").
267-
268-
Big *O* notation
269-
================
270-
271-
Big *O* notation is used to describe the performance of algorithms.
272-
273-
Use italics for the big *O* and variables. For example:
274-
275-
======================== ====================
276-
reStructuredText Rendered
277-
======================== ====================
278-
``*O*\ (1)`` *O*\ (1)
279-
``*O*\ (log *n*)`` *O*\ (log *n*)
280-
``*O*\ (*n*)`` *O*\ (*n*)
281-
``*O*\ (*n* log *n*)`` *O*\ (*n* log *n*)
282-
``*O*\ (*n*\ :sup:`2`)`` *O*\ (*n*\ :sup:`2`)
283-
======================== ====================

0 commit comments

Comments
 (0)