From 06dcd45ff81e06bc8cf40ed487c0b2652d346a5a Mon Sep 17 00:00:00 2001 From: John DeNisco Date: Thu, 26 Jul 2018 12:45:10 -0400 Subject: Initial commit of Sphinx docs Change-Id: I9fca8fb98502dffc2555f9de7f507b6f006e0e77 Signed-off-by: John DeNisco --- .../writingdocs/styleguide/styleguide02table.rst | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 docs/gettingstarted/writingdocs/styleguide/styleguide02table.rst (limited to 'docs/gettingstarted/writingdocs/styleguide/styleguide02table.rst') diff --git a/docs/gettingstarted/writingdocs/styleguide/styleguide02table.rst b/docs/gettingstarted/writingdocs/styleguide/styleguide02table.rst new file mode 100644 index 00000000000..742888be760 --- /dev/null +++ b/docs/gettingstarted/writingdocs/styleguide/styleguide02table.rst @@ -0,0 +1,76 @@ +.. _styleguide02table: + +****** +Tables +****** + +There are two types of tables with different syntax, `Grid Tables `_, and `Simple Tables `_. + +Grid Tables +___________ + +`Grid Tables `_ are described with a visual grid made up of the characters "-", "=", "|", and "+". The hyphen ("-") is used for horizontal lines (row separators). The equals sign ("=") may be used to separate optional header rows from the table body. The vertical bar ("|") is used for vertical lines (column separators). The plus sign ("+") is used for intersections of horizontal and vertical lines. + +Here is example code for a grid table in a *.rst* file: + +.. code-block:: console + + +------------------------+------------+----------+----------+ + | Header row, column 1 | Header 2 | Header 3 | Header 4 | + | (header rows optional) | | | | + +========================+============+==========+==========+ + | body row 1, column 1 | column 2 | column 3 | column 4 | + +------------------------+------------+----------+----------+ + | body row 2 | Cells may span columns. | + +------------------------+------------+---------------------+ + | body row 3 | Cells may | - Table cells | + +------------------------+ span rows. | - contain | + | body row 4 | | - body elements. | + +------------------------+------------+---------------------+ + +This example code generates a grid table that looks like this: + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++------------------------+------------+----------+----------+ +| body row 2 | Cells may span columns. | ++------------------------+------------+---------------------+ +| body row 3 | Cells may | - Table cells | ++------------------------+ span rows. | - contain | +| body row 4 | | - body elements. | ++------------------------+------------+---------------------+ + + +Simple Tables +_____________ + +`Simple tables `_ are described with horizontal borders made up of "=" and "-" characters. The equals sign ("=") is used for top and bottom table borders, and to separate optional header rows from the table body. The hyphen ("-") is used to indicate column spans in a single row by underlining the joined columns, and may optionally be used to explicitly and/or visually separate rows. + +Simple tables are "simpler" to create than grid tables, but are more limited. + +Here is example code for a simple table in a *.rst* file. + +.. code-block:: console + + ===== ===== ======= + A B A and B + ===== ===== ======= + False False False + True False False + False True False + True True True + ===== ===== ======= + +This example code generates a simple table that looks like this: + +===== ===== ======= + A B A and B +===== ===== ======= +False False False +True False False +False True False +True True True +===== ===== ======= \ No newline at end of file -- cgit 1.2.3-korg