Skip to content

Commit 0140f3c

Browse files
authored
Move markup concerns from style to markup (#1292)
1 parent 235cc7f commit 0140f3c

File tree

2 files changed

+41
-34
lines changed

2 files changed

+41
-34
lines changed

Diff for: documentation/markup.rst

+38
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,22 @@ 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 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+
5571
Paragraphs
5672
----------
5773

@@ -289,6 +305,28 @@ There are some problems one commonly runs into while authoring reST documents:
289305
separated from the surrounding text by non-word characters, you have to use
290306
an escaped space to get around that.
291307

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+
292330
.. _additional-markup-constructs:
293331

294332
Additional markup constructs

Diff for: documentation/style-guide.rst

+3-34
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)