summaryrefslogtreecommitdiffstats
path: root/Documentation/doc-guide
diff options
context:
space:
mode:
authorJoe Stringer <joe@isovalent.com>2023-04-24 10:18:50 -0700
committerJonathan Corbet <corbet@lwn.net>2023-06-09 01:57:56 -0600
commit35d4a3c67eb5fe786e93e06df103fc3f181eaf07 (patch)
treeb41925071916f9a8e29c627da9fe7f92296671b7 /Documentation/doc-guide
parenteed892da9cd08be76a8f467c600ef58716dbb4d2 (diff)
downloadlinux-stable-35d4a3c67eb5fe786e93e06df103fc3f181eaf07.tar.gz
linux-stable-35d4a3c67eb5fe786e93e06df103fc3f181eaf07.tar.bz2
linux-stable-35d4a3c67eb5fe786e93e06df103fc3f181eaf07.zip
docs/doc-guide: Clarify how to write tables
Prior to this commit, the kernel docs writing guide spent over a page describing exactly how *not* to write tables into the kernel docs, without providing a example about the desired format. This patch provides a positive example first in the guide so that it's harder to miss, then leaves the existing less desirable approach below for contributors to follow if they have some stronger justification for why to use that approach. Signed-off-by: Joe Stringer <joe@isovalent.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20230424171850.3612317-1-joe@isovalent.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/doc-guide')
-rw-r--r--Documentation/doc-guide/sphinx.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/doc-guide/sphinx.rst b/Documentation/doc-guide/sphinx.rst
index 23edb427e76f..cd8ad7904491 100644
--- a/Documentation/doc-guide/sphinx.rst
+++ b/Documentation/doc-guide/sphinx.rst
@@ -313,9 +313,18 @@ the documentation build system will automatically turn a reference to
function name exists. If you see ``c:func:`` use in a kernel document,
please feel free to remove it.
+Tables
+------
+
+ReStructuredText provides several options for table syntax. Kernel style for
+tables is to prefer *simple table* syntax or *grid table* syntax. See the
+`reStructuredText user reference for table syntax`_ for more details.
+
+.. _reStructuredText user reference for table syntax:
+ https://docutils.sourceforge.io/docs/user/rst/quickref.html#tables
list tables
------------
+~~~~~~~~~~~
The list-table formats can be useful for tables that are not easily laid
out in the usual Sphinx ASCII-art formats. These formats are nearly