summaryrefslogtreecommitdiff
path: root/docutils/test/functional
diff options
context:
space:
mode:
authormilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2021-10-01 13:39:33 +0000
committermilde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2021-10-01 13:39:33 +0000
commite687396c4491d6e120ee2e2b576b9a76aa69fea4 (patch)
treee2595479283784353a6665c515317ccd4e1df8bb /docutils/test/functional
parent03130753046e2d6ffdc1a0629cce3598e644dc11 (diff)
downloaddocutils-e687396c4491d6e120ee2e2b576b9a76aa69fea4.tar.gz
HTML5: New default for table column widths (fixes bug #426).
Only specify table column widths, if the "widths" option is set and is not "auto". The `table_style`_ setting "colwidths-grid" restores the current default. git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@8836 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/functional')
-rw-r--r--docutils/test/functional/expected/footnotes_html5.html4
-rw-r--r--docutils/test/functional/expected/latex_memoir.tex2
-rw-r--r--docutils/test/functional/expected/math_output_html.html2
-rw-r--r--docutils/test/functional/expected/math_output_latex.html2
-rw-r--r--docutils/test/functional/expected/math_output_mathjax.html2
-rw-r--r--docutils/test/functional/expected/math_output_mathml.html7
-rw-r--r--docutils/test/functional/expected/standalone_rst_html4css1.html6
-rw-r--r--docutils/test/functional/expected/standalone_rst_html5.html50
-rw-r--r--docutils/test/functional/expected/standalone_rst_latex.tex2
-rw-r--r--docutils/test/functional/expected/standalone_rst_xetex.tex2
-rw-r--r--docutils/test/functional/input/data/math.txt2
11 files changed, 15 insertions, 66 deletions
diff --git a/docutils/test/functional/expected/footnotes_html5.html b/docutils/test/functional/expected/footnotes_html5.html
index 6422298cb..73c0e0a5e 100644
--- a/docutils/test/functional/expected/footnotes_html5.html
+++ b/docutils/test/functional/expected/footnotes_html5.html
@@ -108,10 +108,6 @@ admonitions<a class="footnote-reference superscript" href="#footnote-9" id="foot
<aside class="footnote superscript" id="footnote-10" role="note">
<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#footnote-reference-13">10</a><span class="fn-bracket">]</span></span>
<table>
-<colgroup>
-<col style="width: 36%" />
-<col style="width: 64%" />
-</colgroup>
<tbody>
<tr><td><p>a</p></td>
<td><p>table</p></td>
diff --git a/docutils/test/functional/expected/latex_memoir.tex b/docutils/test/functional/expected/latex_memoir.tex
index e4fdbf88f..23728e37c 100644
--- a/docutils/test/functional/expected/latex_memoir.tex
+++ b/docutils/test/functional/expected/latex_memoir.tex
@@ -1840,7 +1840,7 @@ physical system changes in time.
\begin{description}
\item[{Math-Accents:}] \leavevmode
-\setlength{\DUtablewidth}{\linewidth}%
+\setlength{\DUtablewidth}{1.000\linewidth}%
\begin{longtable*}{p{0.315\DUtablewidth}p{0.315\DUtablewidth}p{0.315\DUtablewidth}}
$\acute{a}$ \texttt{\textbackslash{}acute\{a\}}
diff --git a/docutils/test/functional/expected/math_output_html.html b/docutils/test/functional/expected/math_output_html.html
index 252db232d..6f5864b57 100644
--- a/docutils/test/functional/expected/math_output_html.html
+++ b/docutils/test/functional/expected/math_output_html.html
@@ -74,7 +74,7 @@ directives:</p>
physical system changes in time.</p>
<dl class="docutils">
<dt>Math-Accents:</dt>
-<dd><table border="1" class="colwidths-given borderless first last docutils">
+<dd><table border="1" class="borderless first last docutils" style="width: 100%">
<colgroup>
<col width="33%" />
<col width="33%" />
diff --git a/docutils/test/functional/expected/math_output_latex.html b/docutils/test/functional/expected/math_output_latex.html
index 140f5609f..a99638a8b 100644
--- a/docutils/test/functional/expected/math_output_latex.html
+++ b/docutils/test/functional/expected/math_output_latex.html
@@ -47,7 +47,7 @@ i\hbar \frac{\partial }{\partial t}\Psi = \hat{H}\Psi ,
physical system changes in time.</p>
<dl class="docutils">
<dt>Math-Accents:</dt>
-<dd><table border="1" class="colwidths-given borderless first last docutils">
+<dd><table border="1" class="borderless first last docutils" style="width: 100%">
<colgroup>
<col width="33%" />
<col width="33%" />
diff --git a/docutils/test/functional/expected/math_output_mathjax.html b/docutils/test/functional/expected/math_output_mathjax.html
index e995968f1..ab11209da 100644
--- a/docutils/test/functional/expected/math_output_mathjax.html
+++ b/docutils/test/functional/expected/math_output_mathjax.html
@@ -60,7 +60,7 @@ i\hbar \frac{\partial }{\partial t}\Psi = \hat{H}\Psi ,
physical system changes in time.</p>
<dl class="docutils">
<dt>Math-Accents:</dt>
-<dd><table border="1" class="colwidths-given borderless first last docutils">
+<dd><table border="1" class="borderless first last docutils" style="width: 100%">
<colgroup>
<col width="33%" />
<col width="33%" />
diff --git a/docutils/test/functional/expected/math_output_mathml.html b/docutils/test/functional/expected/math_output_mathml.html
index f5f357de7..0d8f66b36 100644
--- a/docutils/test/functional/expected/math_output_mathml.html
+++ b/docutils/test/functional/expected/math_output_mathml.html
@@ -209,12 +209,7 @@ directives:</p>
physical system changes in time.</p>
<dl>
<dt>Math-Accents:</dt>
-<dd><table class="colwidths-given borderless">
-<colgroup>
-<col style="width: 33%" />
-<col style="width: 33%" />
-<col style="width: 33%" />
-</colgroup>
+<dd><table class="borderless" style="width: 100%;">
<tbody>
<tr><td><p><math xmlns="http://www.w3.org/1998/Math/MathML">
<mover>
diff --git a/docutils/test/functional/expected/standalone_rst_html4css1.html b/docutils/test/functional/expected/standalone_rst_html4css1.html
index 7b01b688f..5b690be1b 100644
--- a/docutils/test/functional/expected/standalone_rst_html4css1.html
+++ b/docutils/test/functional/expected/standalone_rst_html4css1.html
@@ -733,7 +733,7 @@ directive:</p>
<p>With the &quot;widths&quot; argument &quot;auto&quot; (or &quot;class&quot; value &quot;colwidths-auto&quot;),
column widths are determined by the backend (if supported by the
writer/backend).</p>
-<span id="target1"></span><table border="1" class="colwidths-auto docutils" id="target2">
+<span id="target1"></span><table border="1" class="docutils" id="target2">
<thead valign="bottom">
<tr><th class="head">A</th>
<th class="head">B</th>
@@ -1193,7 +1193,7 @@ empty: <tt class="docutils literal"><span class="pre">--&gt;</span></tt></td>
<div class="section" id="list-tables">
<h2><a class="toc-backref" href="#toc-entry-41">2.22&nbsp;&nbsp;&nbsp;List Tables</a></h2>
<p>Here's a list table exercising all features:</p>
-<table border="1" class="colwidths-given test docutils" style="width: 95%">
+<table border="1" class="test docutils" style="width: 95%">
<caption>list table with integral header</caption>
<colgroup>
<col width="26%" />
@@ -1222,7 +1222,7 @@ crunchy, now would it?</td>
</tr>
</tbody>
</table>
-<table border="1" class="colwidths-auto docutils align-center">
+<table border="1" class="docutils align-center">
<caption>center aligned list table</caption>
<tbody valign="top">
<tr><td>Albatross</td>
diff --git a/docutils/test/functional/expected/standalone_rst_html5.html b/docutils/test/functional/expected/standalone_rst_html5.html
index c48084df3..10dc7019c 100644
--- a/docutils/test/functional/expected/standalone_rst_html5.html
+++ b/docutils/test/functional/expected/standalone_rst_html5.html
@@ -608,10 +608,6 @@ layout.</p>
<p>Plaintext markup syntax and parser system.</p>
<div class="legend">
<table>
-<colgroup>
-<col style="width: 20%" />
-<col style="width: 80%" />
-</colgroup>
<tbody>
<tr><td><p>re</p></td>
<td><p>Revised, revisited, based on 're' module.</p></td>
@@ -676,10 +672,6 @@ upon the style sheet and the browser or rendering software used.</p>
directive:</p>
<table class="align-left">
<caption>left-aligned table</caption>
-<colgroup>
-<col style="width: 50%" />
-<col style="width: 50%" />
-</colgroup>
<thead>
<tr><th class="head"><p>A</p></th>
<th class="head"><p>not A</p></th>
@@ -696,10 +688,6 @@ directive:</p>
</table>
<table class="align-center">
<caption>center-aligned table</caption>
-<colgroup>
-<col style="width: 50%" />
-<col style="width: 50%" />
-</colgroup>
<thead>
<tr><th class="head"><p>A</p></th>
<th class="head"><p>not A</p></th>
@@ -716,10 +704,6 @@ directive:</p>
</table>
<table class="align-right">
<caption>right-aligned table</caption>
-<colgroup>
-<col style="width: 50%" />
-<col style="width: 50%" />
-</colgroup>
<thead>
<tr><th class="head"><p>A</p></th>
<th class="head"><p>not A</p></th>
@@ -737,7 +721,7 @@ directive:</p>
<p>With the &quot;widths&quot; argument &quot;auto&quot; (or &quot;class&quot; value &quot;colwidths-auto&quot;),
column widths are determined by the backend (if supported by the
writer/backend).</p>
-<span id="target1"></span><table class="colwidths-auto" id="target2">
+<span id="target1"></span><table id="target2">
<thead>
<tr><th class="head"><p>A</p></th>
<th class="head"><p>B</p></th>
@@ -942,11 +926,6 @@ meaningful.</p>
<p>Compound 7, tests the inclusion of various block-level
elements in one logical paragraph. First a table,</p>
<table>
-<colgroup>
-<col style="width: 33%" />
-<col style="width: 33%" />
-<col style="width: 33%" />
-</colgroup>
<tbody>
<tr><td><p>Left cell, first
paragraph.</p>
@@ -1084,11 +1063,6 @@ Fifth test in HTML.<br />Line two.</section>
<h3><a class="toc-backref" href="#toc-entry-38" role="doc-backlink"><span class="sectnum">2.19 </span>Colspanning tables</a></h3>
<p>This table has a cell spanning two columns:</p>
<table>
-<colgroup>
-<col style="width: 31%" />
-<col style="width: 31%" />
-<col style="width: 38%" />
-</colgroup>
<thead>
<tr><th class="head" colspan="2"><p>Inputs</p></th>
<th class="head"><p>Output</p></th>
@@ -1122,11 +1096,6 @@ Fifth test in HTML.<br />Line two.</section>
<h3><a class="toc-backref" href="#toc-entry-39" role="doc-backlink"><span class="sectnum">2.20 </span>Rowspanning tables</a></h3>
<p>Here's a table with cells spanning several rows:</p>
<table>
-<colgroup>
-<col style="width: 44%" />
-<col style="width: 22%" />
-<col style="width: 33%" />
-</colgroup>
<thead>
<tr><th class="head"><p>Header row, column 1
(header rows optional)</p></th>
@@ -1155,12 +1124,6 @@ cell.</p></td>
<h3><a class="toc-backref" href="#toc-entry-40" role="doc-backlink"><span class="sectnum">2.21 </span>Complex tables</a></h3>
<p>Here's a complex table, which should test all features.</p>
<table>
-<colgroup>
-<col style="width: 43%" />
-<col style="width: 21%" />
-<col style="width: 18%" />
-<col style="width: 18%" />
-</colgroup>
<thead>
<tr><th class="head"><p>Header row, column 1
(header rows optional)</p></th>
@@ -1203,7 +1166,7 @@ empty: <span class="docutils literal"><span class="pre">--&gt;</span></span></p>
<section id="list-tables">
<h3><a class="toc-backref" href="#toc-entry-41" role="doc-backlink"><span class="sectnum">2.22 </span>List Tables</a></h3>
<p>Here's a list table exercising all features:</p>
-<table class="colwidths-given test" style="width: 95%;">
+<table class="test" style="width: 95%;">
<caption>list table with integral header</caption>
<colgroup>
<col style="width: 26%" />
@@ -1232,7 +1195,7 @@ crunchy, now would it?</p></td>
</tr>
</tbody>
</table>
-<table class="align-center colwidths-auto">
+<table class="align-center">
<caption>center aligned list table</caption>
<tbody>
<tr><td><p>Albatross</p></td>
@@ -1475,11 +1438,6 @@ setting (or command line argument).</p>
<li><p>Numbered tables can be achieved with the &quot;numbered&quot; class option:</p>
<table class="numbered">
<caption>truth values</caption>
-<colgroup>
-<col style="width: 29%" />
-<col style="width: 29%" />
-<col style="width: 42%" />
-</colgroup>
<thead>
<tr><th class="head"><p>A</p></th>
<th class="head"><p>B</p></th>
@@ -1514,7 +1472,7 @@ from the <a class="reference external" href="http://tug.ctan.org/tex-archive/mac
</ul>
<p>&quot;Booktabs&quot; style table, numbered, centre-aligned, with auto-sized columns:</p>
<blockquote>
-<table class="align-center booktabs numbered colwidths-auto">
+<table class="align-center booktabs numbered">
<caption>I/O values</caption>
<thead>
<tr><th class="head" colspan="2"><p>Input</p></th>
diff --git a/docutils/test/functional/expected/standalone_rst_latex.tex b/docutils/test/functional/expected/standalone_rst_latex.tex
index 92822cd64..1c2adc208 100644
--- a/docutils/test/functional/expected/standalone_rst_latex.tex
+++ b/docutils/test/functional/expected/standalone_rst_latex.tex
@@ -1862,7 +1862,7 @@ physical system changes in time.
\begin{description}
\item[{Math-Accents:}] \leavevmode
-\setlength{\DUtablewidth}{\linewidth}%
+\setlength{\DUtablewidth}{1.000\linewidth}%
\begin{longtable*}{p{0.315\DUtablewidth}p{0.315\DUtablewidth}p{0.315\DUtablewidth}}
$\acute{a}$ \texttt{\textbackslash{}acute\{a\}}
diff --git a/docutils/test/functional/expected/standalone_rst_xetex.tex b/docutils/test/functional/expected/standalone_rst_xetex.tex
index 41acad56f..17ad0d562 100644
--- a/docutils/test/functional/expected/standalone_rst_xetex.tex
+++ b/docutils/test/functional/expected/standalone_rst_xetex.tex
@@ -1900,7 +1900,7 @@ physical system changes in time.
\begin{description}
\item[{Math-Accents:}] \leavevmode
-\setlength{\DUtablewidth}{\linewidth}%
+\setlength{\DUtablewidth}{1.000\linewidth}%
\begin{longtable*}{p{0.315\DUtablewidth}p{0.315\DUtablewidth}p{0.315\DUtablewidth}}
$\acute{a}$ \texttt{\textbackslash{}acute\{a\}}
diff --git a/docutils/test/functional/input/data/math.txt b/docutils/test/functional/input/data/math.txt
index 08583d4ad..99f42b6eb 100644
--- a/docutils/test/functional/input/data/math.txt
+++ b/docutils/test/functional/input/data/math.txt
@@ -49,7 +49,7 @@ physical system changes in time.
Math-Accents:
.. list-table::
:class: borderless
- :widths: 26 26 26
+ :width: 100%
* - :math:`\acute{a}` ``\acute{a}``
- :math:`\dot{t}` ``\dot{t}``