Skip to content

Commit 35d4a3c

Browse files
joestringerJonathan Corbet
authored andcommitted
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>
1 parent eed892d commit 35d4a3c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Documentation/doc-guide/sphinx.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,18 @@ the documentation build system will automatically turn a reference to
313313
function name exists. If you see ``c:func:`` use in a kernel document,
314314
please feel free to remove it.
315315

316+
Tables
317+
------
318+
319+
ReStructuredText provides several options for table syntax. Kernel style for
320+
tables is to prefer *simple table* syntax or *grid table* syntax. See the
321+
`reStructuredText user reference for table syntax`_ for more details.
322+
323+
.. _reStructuredText user reference for table syntax:
324+
https://docutils.sourceforge.io/docs/user/rst/quickref.html#tables
316325

317326
list tables
318-
-----------
327+
~~~~~~~~~~~
319328

320329
The list-table formats can be useful for tables that are not easily laid
321330
out in the usual Sphinx ASCII-art formats. These formats are nearly

0 commit comments

Comments
 (0)