summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-latex-table/tabular.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:25:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:25:40 +0000
commitcf7da1843c45a4c2df7a749f7886a2d2ba0ee92a (patch)
tree18dcde1a8d1f5570a77cd0c361de3b490d02c789 /tests/roots/test-latex-table/tabular.rst
parentInitial commit. (diff)
downloadsphinx-cf7da1843c45a4c2df7a749f7886a2d2ba0ee92a.tar.xz
sphinx-cf7da1843c45a4c2df7a749f7886a2d2ba0ee92a.zip
Adding upstream version 7.2.6.upstream/7.2.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/roots/test-latex-table/tabular.rst')
-rw-r--r--tests/roots/test-latex-table/tabular.rst173
1 files changed, 173 insertions, 0 deletions
diff --git a/tests/roots/test-latex-table/tabular.rst b/tests/roots/test-latex-table/tabular.rst
new file mode 100644
index 0000000..15db823
--- /dev/null
+++ b/tests/roots/test-latex-table/tabular.rst
@@ -0,0 +1,173 @@
+tabular and tabulary
+====================
+
+simple table
+------------
+
+======= =======
+header1 header2
+======= =======
+cell1-1 cell1-2
+cell2-1 cell2-2
+cell3-1 cell3-2
+======= =======
+
+table having :widths: option
+----------------------------
+
+.. _mytabular:
+
+.. table::
+ :widths: 30,70
+ :name: namedtabular
+ :class: booktabs, colorrows
+
+ ======= =======
+ header1 header2
+ ======= =======
+ cell1-1 cell1-2
+ cell2-1 cell2-2
+ cell3-1 cell3-2
+ ======= =======
+
+See :ref:`this <mytabular>`, same as namedtabular_.
+
+table having :align: option (tabulary)
+--------------------------------------
+
+.. table::
+ :align: right
+
+ ======= =======
+ header1 header2
+ ======= =======
+ cell1-1 cell1-2
+ cell2-1 cell2-2
+ cell3-1 cell3-2
+ ======= =======
+
+table having :align: option (tabular)
+-------------------------------------
+
+.. table::
+ :align: left
+ :widths: 30,70
+
+ ======= =======
+ header1 header2
+ ======= =======
+ cell1-1 cell1-2
+ cell2-1 cell2-2
+ cell3-1 cell3-2
+ ======= =======
+
+table with tabularcolumn
+------------------------
+
+.. tabularcolumns:: cc
+
+======= =======
+header1 header2
+======= =======
+cell1-1 cell1-2
+cell2-1 cell2-2
+cell3-1 cell3-2
+======= =======
+
+table with cell in first column having three paragraphs
+-------------------------------------------------------
+
++--------------+
+| header1 |
++==============+
+| cell1-1-par1 |
+| |
+| cell1-1-par2 |
+| |
+| cell1-1-par3 |
++--------------+
+
+
+table having caption
+--------------------
+
+.. list-table:: caption for table
+ :header-rows: 1
+
+ * - header1
+ - header2
+ * - cell1-1
+ - cell1-2
+ * - cell2-1
+ - cell2-2
+ * - cell3-1
+ - cell3-2
+
+table having verbatim
+---------------------
+
+.. list-table::
+ :header-rows: 1
+
+ * - header1
+ - header2
+ * - ::
+
+ hello world
+
+ - cell1-2
+ * - cell2-1
+ - cell2-2
+ * - cell3-1
+ - cell3-2
+
+table having both :widths: and problematic cell
+-----------------------------------------------
+
+.. list-table::
+ :header-rows: 1
+ :widths: 30,70
+
+ * - header1
+ - header2
+ * - + item1
+ + item2
+ - cell1-2
+ * - cell2-1
+ - cell2-2
+ * - cell3-1
+ - cell3-2
+
+table having problematic cell
+-----------------------------
+
+.. list-table::
+ :header-rows: 1
+
+ * - header1
+ - header2
+ * - + item1
+ + item2
+ - cell1-2
+ * - cell2-1
+ - cell2-2
+ * - cell3-1
+ - cell3-2
+
+table having both stub columns and problematic cell
+---------------------------------------------------
+
+.. list-table::
+ :header-rows: 1
+ :stub-columns: 2
+
+ * - header1
+ - header2
+ - header3
+ * - + instub1-1a
+ + instub1-1b
+ - instub1-2
+ - notinstub1-3
+ * - cell2-1
+ - cell2-2
+ - cell2-3