diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2016-08-03 20:06:16 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2016-08-03 20:06:16 +0000 |
| commit | 76aaf05017e9d4d6e98a41aa2f570cb446174b15 (patch) | |
| tree | 1d18c9730a8f072e07651d993bb0b31d79c89beb /docutils/test/functional | |
| parent | 139000d4bc086c4861b851c0092af93f5dfe2683 (diff) | |
| download | docutils-76aaf05017e9d4d6e98a41aa2f570cb446174b15.tar.gz | |
Fixes for the latex2e writer table handling.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7965 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/functional')
| -rw-r--r-- | docutils/test/functional/expected/standalone_rst_latex.tex | 48 | ||||
| -rw-r--r-- | docutils/test/functional/input/data/tables_latex.txt | 34 |
2 files changed, 47 insertions, 35 deletions
diff --git a/docutils/test/functional/expected/standalone_rst_latex.tex b/docutils/test/functional/expected/standalone_rst_latex.tex index b978cb4ba..6e003cbbe 100644 --- a/docutils/test/functional/expected/standalone_rst_latex.tex +++ b/docutils/test/functional/expected/standalone_rst_latex.tex @@ -1824,7 +1824,7 @@ A table with multi-paragraph multicolumn cells: test & \textbf{bold hd} - & \multicolumn{3}{p{0.41\DUtablewidth}|}{ + & \multicolumn{3}{p{0.41\DUtablewidth}|}{% multicolumn 1 With a second paragraph @@ -1832,7 +1832,7 @@ With a second paragraph \emph{emph hd} \\ \hline -\multicolumn{2}{|p{0.31\DUtablewidth}|}{ +\multicolumn{2}{|p{0.31\DUtablewidth}|}{% multicolumn 2 With a second paragraph @@ -1848,7 +1848,7 @@ cell \hline cell - & \multicolumn{2}{p{0.36\DUtablewidth}|}{ + & \multicolumn{2}{p{0.36\DUtablewidth}|}{% multicolumn 3 (one line, but very very very very very looooong) @@ -1866,7 +1866,7 @@ cell cell & cell - & \multicolumn{3}{p{0.38\DUtablewidth}|}{ + & \multicolumn{3}{p{0.38\DUtablewidth}|}{% Short multicolumn 4 } \\ \hline @@ -1877,40 +1877,36 @@ limitation (see \url{https://sourceforge.net/p/docutils/bugs/225/}). A table with multirow header and column-widths set by LaTeX: -\setlength{\DUtablewidth}{\linewidth} \begin{longtable*}[c]{|l|l|} \hline -\multirow{2}{*}{% -\textbf{% -XXX -}} & \textbf{% -Variable Summary -} \\ +\multirow{2}{*}{\textbf{XXX}} & \textbf{Variable Summary} \\ \cline{2-2} - & \textbf{% -Description -} \\ + & \textbf{Description} \\ \hline \endfirsthead \hline -\multirow{2}{*}{% -\textbf{% -XXX -}} & \textbf{% -Variable Summary -} \\ +\multirow{2}{*}{\textbf{XXX}} & \textbf{Variable Summary} \\ \cline{2-2} - & \textbf{% -Description -} \\ + & \textbf{Description} \\ \hline \endhead \multicolumn{2}{c}{\hfill ... continued on next page} \\ \endfoot \endlastfoot -\multicolumn{2}{|l|}{ -multicollumn cell -} \\ +\multicolumn{2}{|l|}{multicollumn cell} \\ +\hline +\end{longtable*} + +In a table with column-widths set by LaTeX, each cell has just one line. +Paragraphs are merged (a warning is given). + +\begin{longtable*}[c]{|l|l|} +\hline +11 & first paragraph +second paragraph +third paragraph \\ +\hline +21 & 22 \\ \hline \end{longtable*} diff --git a/docutils/test/functional/input/data/tables_latex.txt b/docutils/test/functional/input/data/tables_latex.txt index b684dbf31..2fbfdd1d6 100644 --- a/docutils/test/functional/input/data/tables_latex.txt +++ b/docutils/test/functional/input/data/tables_latex.txt @@ -25,12 +25,28 @@ limitation (see https://sourceforge.net/p/docutils/bugs/225/). A table with multirow header and column-widths set by LaTeX: .. table:: - :widths: auto - - +------------+-------------------+ - | XXX | Variable Summary | - | +-------------------+ - | | Description | - +============+===================+ - | multicollumn cell | - +--------------------------------+ + :widths: auto + + +------------+-------------------+ + | XXX | Variable Summary | + | +-------------------+ + | | Description | + +============+===================+ + | multicollumn cell | + +--------------------------------+ + +In a table with column-widths set by LaTeX, each cell has just one line. +Paragraphs are merged (a warning is given). + +.. table:: + :widths: auto + + +------------+-------------------+ + | 11 | first paragraph | + | | | + | | second paragraph | + | | | + | | third paragraph | + +------------+-------------------+ + | 21 | 22 | + +------------+-------------------+ |
