diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2016-07-26 18:15:59 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2016-07-26 18:15:59 +0000 |
| commit | e8d8e7ea841b1c57d2ec1f7f4188536f9529aa33 (patch) | |
| tree | eee329d7fd03815426482d80971bfe184acea8c0 /docutils/test/functional/input | |
| parent | 94c94a58a52fd94163a529dddcefaf02b454d785 (diff) | |
| download | docutils-e8d8e7ea841b1c57d2ec1f7f4188536f9529aa33.tar.gz | |
Implement feature request [ 48 ]
Add :align: option to the table directives.
Thanks to Takeshi KOMIYA for the patch.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7952 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/functional/input')
6 files changed, 59 insertions, 10 deletions
diff --git a/docutils/test/functional/input/data/list_table.txt b/docutils/test/functional/input/data/list_table.txt index 632285e36..9e23392f2 100644 --- a/docutils/test/functional/input/data/list_table.txt +++ b/docutils/test/functional/input/data/list_table.txt @@ -22,3 +22,13 @@ Here's a list table exercising all features: * - Gannet Ripple - 1.99 - On a stick! + +.. list-table:: center aligned list table + :align: center + + * - Albatross + - 2.99 + * - Crunchy Frog + - 1.49 + * - Gannet Ripple + - 1.99 diff --git a/docutils/test/functional/input/data/standard.txt b/docutils/test/functional/input/data/standard.txt index d306e5ae1..77433b526 100644 --- a/docutils/test/functional/input/data/standard.txt +++ b/docutils/test/functional/input/data/standard.txt @@ -597,6 +597,41 @@ This paragraph might flow around the figure. The specific behavior depends upon the style sheet and the browser or rendering software used. +Tables may be given titles and additional arguments with the *table* +directive: + +.. Table:: left-aligned table + :align: left + + ===== ===== + A not A + ===== ===== + False True + True False + ===== ===== + +.. Table:: center-aligned table + :align: center + + ===== ===== + A not A + ===== ===== + False True + True False + ===== ===== + +.. Table:: right-aligned table + :align: right + + ===== ===== + A not A + ===== ===== + False True + True False + ===== ===== + + + Admonitions ``````````` diff --git a/docutils/test/functional/input/data/svg_images.txt b/docutils/test/functional/input/data/svg_images.txt index 3d12442e2..6c1a4c015 100644 --- a/docutils/test/functional/input/data/svg_images.txt +++ b/docutils/test/functional/input/data/svg_images.txt @@ -28,8 +28,8 @@ b) The method used to put the image in the document. * including within SVG using the SVG ``<image>`` tag, * embedd the SVG code within HTML (inlining). - The `html4css1` writer uses ``<object>`` tags, the `html-base` and `xhtml11` - writers use ``<img>`` tags. + The `html4css1` writer uses ``<object>`` tags, the `html5` + writer uses ``<img>`` tags. .. cf. http://edutechwiki.unige.ch/en/Using_SVG_with_HTML5_tutorial diff --git a/docutils/test/functional/input/data/tables_latex.txt b/docutils/test/functional/input/data/tables_latex.txt index 1e8550ca1..0201aa380 100644 --- a/docutils/test/functional/input/data/tables_latex.txt +++ b/docutils/test/functional/input/data/tables_latex.txt @@ -1,7 +1,7 @@ More Tables ----------- -A multicolumn table with multi-paragraph rowspanning cells: +A table with multi-paragraph multicolumn cells: +----------+--------------+---------------------------------+-----------+ | test | **bold hd** | multicolumn 1 | *emph hd* | @@ -19,7 +19,10 @@ A multicolumn table with multi-paragraph rowspanning cells: | cell | cell | cell | Short multicolumn 4 | +----------+--------------+--------------+------------------------------+ -A table with multirow header +Tables with multi-paragraph multirow cells currently fail due to a LaTeX +limitation (see https://sourceforge.net/p/docutils/bugs/225/). + +A table with multirow header: +------------+-------------------+ diff --git a/docutils/test/functional/input/standalone_rst_html_plain.txt b/docutils/test/functional/input/standalone_rst_html_plain.txt index 35a142982..067406f95 100644 --- a/docutils/test/functional/input/standalone_rst_html_plain.txt +++ b/docutils/test/functional/input/standalone_rst_html_plain.txt @@ -174,10 +174,10 @@ False True True True True True ===== ===== ====== -This table also uses the "align-left" class argument, to left-align -the headers: +This table also uses the "align-right" class argument, to right-align +the table: -.. class:: booktabs align-left +.. class:: booktabs align-right ===== ===== ======= A B A or B @@ -189,9 +189,10 @@ True True True ===== ===== ======= -Of course, also "booktabs" style tables can be numbered: +"Booktabs" style table, numbered and centre-aligned: .. table:: I/O values + :align: center :class: numbered booktabs ===== ===== ====== diff --git a/docutils/test/functional/input/standalone_rst_latex.txt b/docutils/test/functional/input/standalone_rst_latex.txt index f5f229da6..a28f42a8f 100644 --- a/docutils/test/functional/input/standalone_rst_latex.txt +++ b/docutils/test/functional/input/standalone_rst_latex.txt @@ -21,8 +21,8 @@ not need to be tested with other writers (e.g. the HTML writer). .. include:: data/hyperlinking.txt .. include:: data/urls.txt .. include:: data/section_titles.txt -.. unusual combinations (from newlatex, for interactive testing) - .. include:: data/latex.txt +.. unusual combinations (currently separately tested) + .. include:: data/latex_cornercases.txt .. Preface for System Messages: .. include:: data/errors.txt |
