diff options
author | Peter Fabinski <github@peterfab.com> | 2021-08-03 17:34:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-03 15:34:39 -0600 |
commit | 8667ba2bcc8a7da6ba50369161c0bcb9020780e8 (patch) | |
tree | 61b348636913d420e975ac8fbfc0be9f40cfcb91 /test | |
parent | f938378d001cb892ccccbf6808010dd69becc26f (diff) | |
download | pandoc-8667ba2bcc8a7da6ba50369161c0bcb9020780e8.tar.gz |
LaTeX table writer: Increase column width precision (#7466)
In some cases, the rounding performed by the LaTeX table
writer would introduce visible overrun outside the text
area.
This adds two more decimal places to the width values.
Diffstat (limited to 'test')
-rw-r--r-- | test/command/5367.md | 2 | ||||
-rw-r--r-- | test/command/7272.md | 2 | ||||
-rw-r--r-- | test/tables.latex | 24 | ||||
-rw-r--r-- | test/tables/nordics.latex | 8 | ||||
-rw-r--r-- | test/tables/students.latex | 4 |
5 files changed, 20 insertions, 20 deletions
diff --git a/test/command/5367.md b/test/command/5367.md index a67011c2f..427aab913 100644 --- a/test/command/5367.md +++ b/test/command/5367.md @@ -21,7 +21,7 @@ dolly[^5] hello\footnote{doc footnote} \begin{longtable}[]{@{} - >{\centering\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{0.17}}@{}} + >{\centering\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{0.1667}}@{}} \caption[Sample table.]{Sample table.\footnote{caption footnote}}\tabularnewline \toprule \begin{minipage}[b]{\linewidth}\centering diff --git a/test/command/7272.md b/test/command/7272.md index d27b25143..cea282a10 100644 --- a/test/command/7272.md +++ b/test/command/7272.md @@ -15,7 +15,7 @@ </table> ^D \begin{longtable}[]{@{} - >{\raggedright\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{1.00}}@{}} + >{\raggedright\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{1.0000}}@{}} \toprule \endhead \begin{minipage}[t]{\linewidth}\raggedright diff --git a/test/tables.latex b/test/tables.latex index 9d111fa7a..eba77c7b9 100644 --- a/test/tables.latex +++ b/test/tables.latex @@ -50,10 +50,10 @@ Right & Left & Center & Default \\ Multiline table with caption: \begin{longtable}[]{@{} - >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}} - >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}} - >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}} + >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}} + >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1375}} + >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1625}} + >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3500}}@{}} \caption{Here's the caption. It may span multiple lines.}\tabularnewline \toprule \begin{minipage}[b]{\linewidth}\centering @@ -87,10 +87,10 @@ Second & row & 5.0 & Here's another one. Note the blank line between rows. \\ Multiline table without caption: \begin{longtable}[]{@{} - >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}} - >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}} - >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}} + >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}} + >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1375}} + >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1625}} + >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3500}}@{}} \toprule \begin{minipage}[b]{\linewidth}\centering Centered Header @@ -122,10 +122,10 @@ Table without column headers: Multiline table without column headers: \begin{longtable}[]{@{} - >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}} - >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}} - >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}} - >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}} + >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}} + >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1375}} + >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1625}} + >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3500}}@{}} \toprule \endhead First & row & 12.0 & Example of a row that spans multiple lines. \\ diff --git a/test/tables/nordics.latex b/test/tables/nordics.latex index 6f17a163e..4c10865dc 100644 --- a/test/tables/nordics.latex +++ b/test/tables/nordics.latex @@ -1,8 +1,8 @@ \begin{longtable}[]{@{} - >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}} - >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}} - >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.20}} - >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.20}}@{}} + >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3000}} + >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3000}} + >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.2000}} + >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.2000}}@{}} \caption{States belonging to the \emph{Nordics.}}\tabularnewline \toprule \begin{minipage}[b]{\linewidth}\centering diff --git a/test/tables/students.latex b/test/tables/students.latex index 3d4d287d9..b1ea45ac8 100644 --- a/test/tables/students.latex +++ b/test/tables/students.latex @@ -1,6 +1,6 @@ \begin{longtable}[]{@{} - >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.50}} - >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.50}}@{}} + >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.5000}} + >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.5000}}@{}} \caption{List of Students}\tabularnewline \toprule \begin{minipage}[b]{\linewidth}\centering |