aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2022-08-07 21:46:54 +0200
committerAlbert Krewinkel <[email protected]>2022-08-07 22:10:15 +0200
commit18484cbf47feb2ffa2d08db0f30107dcfdcf31f8 (patch)
treec52371cbbb9c03d716fcabaad833a67dc0a30bb3 /test
parentbf5edd9f02510a710bd888bb44e146f3c59995a5 (diff)
LaTeX writer: fix widths of multicolumn cells
Fixes: #8218
Diffstat (limited to 'test')
-rw-r--r--test/tables/planets.latex8
-rw-r--r--test/tables/students.latex6
2 files changed, 7 insertions, 7 deletions
diff --git a/test/tables/planets.latex b/test/tables/planets.latex
index c248b8ea4..ec637b8df 100644
--- a/test/tables/planets.latex
+++ b/test/tables/planets.latex
@@ -1,20 +1,20 @@
\begin{longtable}[]{@{}cclrrrrrrrrl@{}}
\caption{Data about the planets of our solar system.}\tabularnewline
\toprule()
-\multicolumn{2}{@{}>{\centering\arraybackslash}p{0.0000\columnwidth - 0\tabcolsep}}{%
+\multicolumn{2}{@{}>{\centering\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0000} + 2\tabcolsep}}{%
} & Name & Mass (10\^{}24kg) & Diameter (km) & Density (kg/m\^{}3) & Gravity
(m/s\^{}2) & Length of day (hours) & Distance from Sun (10\^{}6km) & Mean
temperature (C) & Number of moons & Notes \\
\midrule()
\endfirsthead
\toprule()
-\multicolumn{2}{@{}>{\centering\arraybackslash}p{0.0000\columnwidth - 0\tabcolsep}}{%
+\multicolumn{2}{@{}>{\centering\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0000} + 2\tabcolsep}}{%
} & Name & Mass (10\^{}24kg) & Diameter (km) & Density (kg/m\^{}3) & Gravity
(m/s\^{}2) & Length of day (hours) & Distance from Sun (10\^{}6km) & Mean
temperature (C) & Number of moons & Notes \\
\midrule()
\endhead
-\multicolumn{2}{@{}>{\centering\arraybackslash}p{0.0000\columnwidth - 0\tabcolsep}}{%
+\multicolumn{2}{@{}>{\centering\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0000} + 2\tabcolsep}}{%
\multirow{4}{*}{Terrestrial planets}} & Mercury & 0.330 & 4,879 & 5427 & 3.7 &
4222.6 & 57.9 & 167 & 0 & Closest to the Sun \\
& & Venus & 4.87 & 12,104 & 5243 & 8.9 & 2802.0 & 108.2 & 464 & 0 & \\
@@ -27,7 +27,7 @@ planet \\
& \multirow{2}{*}{Ice giants} & Uranus & 86.8 & 51,118 & 1271 & 8.7 & 17.2 &
2872.5 & -195 & 27 & \\
& & Neptune & 102 & 49,528 & 1638 & 11.0 & 16.1 & 4495.1 & -200 & 14 & \\
-\multicolumn{2}{@{}>{\centering\arraybackslash}p{0.0000\columnwidth - 0\tabcolsep}}{%
+\multicolumn{2}{@{}>{\centering\arraybackslash}p{(\columnwidth - 22\tabcolsep) * \real{0.0000} + 2\tabcolsep}}{%
Dwarf planets} & Pluto & 0.0146 & 2,370 & 2095 & 0.7 & 153.3 & 5906.4 & -225 & 5
& Declassified as a planet in 2006. \\
\bottomrule()
diff --git a/test/tables/students.latex b/test/tables/students.latex
index 8f6aeb26c..8a9ae6e6b 100644
--- a/test/tables/students.latex
+++ b/test/tables/students.latex
@@ -18,15 +18,15 @@ Name
\end{minipage} \\
\midrule()
\endhead
-\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{1.0000\columnwidth - 0\tabcolsep}@{}}{%
+\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{1.0000} + 2\tabcolsep}@{}}{%
Computer Science} \\
3741255 & Jones, Martha \\
4077830 & Pierce, Benjamin \\
5151701 & Kirk, James \\
-\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{1.0000\columnwidth - 0\tabcolsep}@{}}{%
+\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{1.0000} + 2\tabcolsep}@{}}{%
Russian Literature} \\
3971244 & Nim, Victor \\
-\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{1.0000\columnwidth - 0\tabcolsep}@{}}{%
+\multicolumn{2}{@{}>{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{1.0000} + 2\tabcolsep}@{}}{%
Astrophysics} \\
4100332 & Petrov, Alexandra \\
4100332 & Toyota, Hiroko \\