git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer: revert table line height increase in 2.11.3.
9a18cf4John MacFarlane
src/Text/Pandoc/Writers/LaTeX/Table.hs+1−1
@@ -169,7 +169,7 @@ rowToLaTeX :: PandocMonad m
169 -> LW m (Doc Text)
169 -> LW m (Doc Text)
170rowToLaTeX blocksWriter celltype row = do
170rowToLaTeX blocksWriter celltype row = do
171 cellsDocs <- mapM (cellToLaTeX blocksWriter celltype) (fillRow row)
171 cellsDocs <- mapM (cellToLaTeX blocksWriter celltype) (fillRow row)
172− return $ hsep (intersperse "&" cellsDocs) <> " \\\\ \\addlinespace"
172+ return $ hsep (intersperse "&" cellsDocs) <> " \\\\"
173
173
174-- | Pads row with empty cells to adjust for rowspans above this row.
174-- | Pads row with empty cells to adjust for rowspans above this row.
175fillRow :: [Ann.Cell] -> [Ann.Cell]
175fillRow :: [Ann.Cell] -> [Ann.Cell]
test/command/2378.md+3−3
@@ -14,14 +14,14 @@ is used.
14\begin{longtable}[]{@{}ll@{}}
14\begin{longtable}[]{@{}ll@{}}
15\caption{a table}\tabularnewline
15\caption{a table}\tabularnewline
16\toprule
16\toprule
17−x & y\footnote{a footnote} \\ \addlinespace
17+x & y\footnote{a footnote} \\
18\midrule
18\midrule
19\endfirsthead
19\endfirsthead
20\toprule
20\toprule
21−x & y{} \\ \addlinespace
21+x & y{} \\
22\midrule
22\midrule
23\endhead
23\endhead
24−1 & 2 \\ \addlinespace
24+1 & 2 \\
25\bottomrule
25\bottomrule
26\end{longtable}
26\end{longtable}
27```
27```
test/command/5367.md+3−3
@@ -24,14 +24,14 @@ hello\footnote{doc footnote}
24 >{\centering\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{0.17}}@{}}
24 >{\centering\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{0.17}}@{}}
25\caption[Sample table.]{Sample table.\footnote{caption footnote}}\tabularnewline
25\caption[Sample table.]{Sample table.\footnote{caption footnote}}\tabularnewline
26\toprule
26\toprule
27−Fruit\footnote{header footnote} \\ \addlinespace
27+Fruit\footnote{header footnote} \\
28\midrule
28\midrule
29\endfirsthead
29\endfirsthead
30\toprule
30\toprule
31−Fruit{} \\ \addlinespace
31+Fruit{} \\
32\midrule
32\midrule
33\endhead
33\endhead
34−Bans\footnote{table cell footnote} \\ \addlinespace
34+Bans\footnote{table cell footnote} \\
35\bottomrule
35\bottomrule
36\end{longtable}
36\end{longtable}
37
37
test/tables.latex+26−35
@@ -3,16 +3,16 @@ Simple table with caption:
3\begin{longtable}[]{@{}rlcl@{}}
3\begin{longtable}[]{@{}rlcl@{}}
4\caption{Demonstration of simple table syntax.}\tabularnewline
4\caption{Demonstration of simple table syntax.}\tabularnewline
5\toprule
5\toprule
6−Right & Left & Center & Default \\ \addlinespace
6+Right & Left & Center & Default \\
7\midrule
7\midrule
8\endfirsthead
8\endfirsthead
9\toprule
9\toprule
10−Right & Left & Center & Default \\ \addlinespace
10+Right & Left & Center & Default \\
11\midrule
11\midrule
12\endhead
12\endhead
13−12 & 12 & 12 & 12 \\ \addlinespace
13+12 & 12 & 12 & 12 \\
14−123 & 123 & 123 & 123 \\ \addlinespace
14+123 & 123 & 123 & 123 \\
15−1 & 1 & 1 & 1 \\ \addlinespace
15+1 & 1 & 1 & 1 \\
16\bottomrule
16\bottomrule
17\end{longtable}
17\end{longtable}
18
18
@@ -20,12 +20,12 @@ Simple table without caption:
20
20
21\begin{longtable}[]{@{}rlcl@{}}
21\begin{longtable}[]{@{}rlcl@{}}
22\toprule
22\toprule
23−Right & Left & Center & Default \\ \addlinespace
23+Right & Left & Center & Default \\
24\midrule
24\midrule
25\endhead
25\endhead
26−12 & 12 & 12 & 12 \\ \addlinespace
26+12 & 12 & 12 & 12 \\
27−123 & 123 & 123 & 123 \\ \addlinespace
27+123 & 123 & 123 & 123 \\
28−1 & 1 & 1 & 1 \\ \addlinespace
28+1 & 1 & 1 & 1 \\
29\bottomrule
29\bottomrule
30\end{longtable}
30\end{longtable}
31
31
@@ -34,16 +34,16 @@ Simple table indented two spaces:
34\begin{longtable}[]{@{}rlcl@{}}
34\begin{longtable}[]{@{}rlcl@{}}
35\caption{Demonstration of simple table syntax.}\tabularnewline
35\caption{Demonstration of simple table syntax.}\tabularnewline
36\toprule
36\toprule
37−Right & Left & Center & Default \\ \addlinespace
37+Right & Left & Center & Default \\
38\midrule
38\midrule
39\endfirsthead
39\endfirsthead
40\toprule
40\toprule
41−Right & Left & Center & Default \\ \addlinespace
41+Right & Left & Center & Default \\
42\midrule
42\midrule
43\endhead
43\endhead
44−12 & 12 & 12 & 12 \\ \addlinespace
44+12 & 12 & 12 & 12 \\
45−123 & 123 & 123 & 123 \\ \addlinespace
45+123 & 123 & 123 & 123 \\
46−1 & 1 & 1 & 1 \\ \addlinespace
46+1 & 1 & 1 & 1 \\
47\bottomrule
47\bottomrule
48\end{longtable}
48\end{longtable}
49
49
@@ -56,19 +56,15 @@ Multiline table with caption:
56 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
56 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
57\caption{Here's the caption. It may span multiple lines.}\tabularnewline
57\caption{Here's the caption. It may span multiple lines.}\tabularnewline
58\toprule
58\toprule
59−Centered Header & Left Aligned & Right Aligned & Default
59+Centered Header & Left Aligned & Right Aligned & Default aligned \\
60−aligned \\ \addlinespace
61\midrule
60\midrule
62\endfirsthead
61\endfirsthead
63\toprule
62\toprule
64−Centered Header & Left Aligned & Right Aligned & Default
63+Centered Header & Left Aligned & Right Aligned & Default aligned \\
65−aligned \\ \addlinespace
66\midrule
64\midrule
67\endhead
65\endhead
68−First & row & 12.0 & Example of a row that spans multiple
66+First & row & 12.0 & Example of a row that spans multiple lines. \\
69−lines. \\ \addlinespace
70−Second & row & 5.0 & Here's another one. Note the blank line between
67+Second & row & 5.0 & Here's another one. Note the blank line between rows. \\
71−rows. \\ \addlinespace
72\bottomrule
68\bottomrule
73\end{longtable}
69\end{longtable}
74
70
@@ -80,14 +76,11 @@ Multiline table without caption:
80 >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
76 >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
81 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
77 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
82\toprule
78\toprule
83−Centered Header & Left Aligned & Right Aligned & Default
79+Centered Header & Left Aligned & Right Aligned & Default aligned \\
84−aligned \\ \addlinespace
85\midrule
80\midrule
86\endhead
81\endhead
87−First & row & 12.0 & Example of a row that spans multiple
82+First & row & 12.0 & Example of a row that spans multiple lines. \\
88−lines. \\ \addlinespace
89−Second & row & 5.0 & Here's another one. Note the blank line between
83+Second & row & 5.0 & Here's another one. Note the blank line between rows. \\
90−rows. \\ \addlinespace
91\bottomrule
84\bottomrule
92\end{longtable}
85\end{longtable}
93
86
@@ -96,9 +89,9 @@ Table without column headers:
96\begin{longtable}[]{@{}rlcr@{}}
89\begin{longtable}[]{@{}rlcr@{}}
97\toprule
90\toprule
98\endhead
91\endhead
99−12 & 12 & 12 & 12 \\ \addlinespace
92+12 & 12 & 12 & 12 \\
100−123 & 123 & 123 & 123 \\ \addlinespace
93+123 & 123 & 123 & 123 \\
101−1 & 1 & 1 & 1 \\ \addlinespace
94+1 & 1 & 1 & 1 \\
102\bottomrule
95\bottomrule
103\end{longtable}
96\end{longtable}
104
97
@@ -111,9 +104,7 @@ Multiline table without column headers:
111 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
104 >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
112\toprule
105\toprule
113\endhead
106\endhead
114−First & row & 12.0 & Example of a row that spans multiple
107+First & row & 12.0 & Example of a row that spans multiple lines. \\
115−lines. \\ \addlinespace
116−Second & row & 5.0 & Here's another one. Note the blank line between
108+Second & row & 5.0 & Here's another one. Note the blank line between rows. \\
117−rows. \\ \addlinespace
118\bottomrule
109\bottomrule
119\end{longtable}
110\end{longtable}
test/tables/nordics.latex+8−10
@@ -6,21 +6,19 @@
6\caption{States belonging to the \emph{Nordics.}}\tabularnewline
6\caption{States belonging to the \emph{Nordics.}}\tabularnewline
7\toprule
7\toprule
8Name & Capital & \vtop{\hbox{\strut Population}\hbox{\strut (in 2018)}} &
8Name & Capital & \vtop{\hbox{\strut Population}\hbox{\strut (in 2018)}} &
9−\vtop{\hbox{\strut Area}\hbox{\strut (in
9+\vtop{\hbox{\strut Area}\hbox{\strut (in km\textsuperscript{2})}} \\
10−km\textsuperscript{2})}} \\ \addlinespace
11\midrule
10\midrule
12\endfirsthead
11\endfirsthead
13\toprule
12\toprule
14Name & Capital & \vtop{\hbox{\strut Population}\hbox{\strut (in 2018)}} &
13Name & Capital & \vtop{\hbox{\strut Population}\hbox{\strut (in 2018)}} &
15−\vtop{\hbox{\strut Area}\hbox{\strut (in
14+\vtop{\hbox{\strut Area}\hbox{\strut (in km\textsuperscript{2})}} \\
16−km\textsuperscript{2})}} \\ \addlinespace
17\midrule
15\midrule
18\endhead
16\endhead
19−Denmark & Copenhagen & 5,809,502 & 43,094 \\ \addlinespace
17+Denmark & Copenhagen & 5,809,502 & 43,094 \\
20−Finland & Helsinki & 5,537,364 & 338,145 \\ \addlinespace
18+Finland & Helsinki & 5,537,364 & 338,145 \\
21−Iceland & Reykjavik & 343,518 & 103,000 \\ \addlinespace
19+Iceland & Reykjavik & 343,518 & 103,000 \\
22−Norway & Oslo & 5,372,191 & 323,802 \\ \addlinespace
20+Norway & Oslo & 5,372,191 & 323,802 \\
23−Sweden & Stockholm & 10,313,447 & 450,295 \\ \addlinespace
21+Sweden & Stockholm & 10,313,447 & 450,295 \\
24−Total & & 27,376,022 & 1,258,336 \\ \addlinespace
22+Total & & 27,376,022 & 1,258,336 \\
25\bottomrule
23\bottomrule
26\end{longtable}
24\end{longtable}
test/tables/planets.latex+11−17
@@ -3,34 +3,28 @@
3\toprule
3\toprule
4\multicolumn{2}{l}{} & Name & Mass (10\^{}24kg) & Diameter (km) & Density
4\multicolumn{2}{l}{} & Name & Mass (10\^{}24kg) & Diameter (km) & Density
5(kg/m\^{}3) & Gravity (m/s\^{}2) & Length of day (hours) & Distance from Sun
5(kg/m\^{}3) & Gravity (m/s\^{}2) & Length of day (hours) & Distance from Sun
6−(10\^{}6km) & Mean temperature (C) & Number of moons & Notes \\ \addlinespace
6+(10\^{}6km) & Mean temperature (C) & Number of moons & Notes \\
7\midrule
7\midrule
8\endfirsthead
8\endfirsthead
9\toprule
9\toprule
10\multicolumn{2}{l}{} & Name & Mass (10\^{}24kg) & Diameter (km) & Density
10\multicolumn{2}{l}{} & Name & Mass (10\^{}24kg) & Diameter (km) & Density
11(kg/m\^{}3) & Gravity (m/s\^{}2) & Length of day (hours) & Distance from Sun
11(kg/m\^{}3) & Gravity (m/s\^{}2) & Length of day (hours) & Distance from Sun
12−(10\^{}6km) & Mean temperature (C) & Number of moons & Notes \\ \addlinespace
12+(10\^{}6km) & Mean temperature (C) & Number of moons & Notes \\
13\midrule
13\midrule
14\endhead
14\endhead
15\multicolumn{2}{l}{\multirow{4}{*}{Terrestrial planets}} & Mercury & 0.330 &
15\multicolumn{2}{l}{\multirow{4}{*}{Terrestrial planets}} & Mercury & 0.330 &
16−4,879 & 5427 & 3.7 & 4222.6 & 57.9 & 167 & 0 & Closest to the
16+4,879 & 5427 & 3.7 & 4222.6 & 57.9 & 167 & 0 & Closest to the Sun \\
17−Sun \\ \addlinespace
18−& & Venus & 4.87 & 12,104 & 5243 & 8.9 & 2802.0 & 108.2 & 464 & 0
17+& & Venus & 4.87 & 12,104 & 5243 & 8.9 & 2802.0 & 108.2 & 464 & 0 & \\
19−& \\ \addlinespace
20−& & Earth & 5.97 & 12,756 & 5514 & 9.8 & 24.0 & 149.6 & 15 & 1 & Our
18+& & Earth & 5.97 & 12,756 & 5514 & 9.8 & 24.0 & 149.6 & 15 & 1 & Our world \\
21−world \\ \addlinespace
22& & Mars & 0.642 & 6,792 & 3933 & 3.7 & 24.7 & 227.9 & -65 & 2 & The red
19& & Mars & 0.642 & 6,792 & 3933 & 3.7 & 24.7 & 227.9 & -65 & 2 & The red
23−planet \\ \addlinespace
20+planet \\
24\multirow{4}{*}{Jovian planets} & \multirow{2}{*}{Gas giants} & Jupiter & 1898
21\multirow{4}{*}{Jovian planets} & \multirow{2}{*}{Gas giants} & Jupiter & 1898
25−& 142,984 & 1326 & 23.1 & 9.9 & 778.6 & -110 & 67 & The largest
22+& 142,984 & 1326 & 23.1 & 9.9 & 778.6 & -110 & 67 & The largest planet \\
26−planet \\ \addlinespace
27−& & Saturn & 568 & 120,536 & 687 & 9.0 & 10.7 & 1433.5 & -140 & 62
23+& & Saturn & 568 & 120,536 & 687 & 9.0 & 10.7 & 1433.5 & -140 & 62 & \\
28−& \\ \addlinespace
29& \multirow{2}{*}{Ice giants} & Uranus & 86.8 & 51,118 & 1271 & 8.7 & 17.2 &
24& \multirow{2}{*}{Ice giants} & Uranus & 86.8 & 51,118 & 1271 & 8.7 & 17.2 &
30−2872.5 & -195 & 27 & \\ \addlinespace
25+2872.5 & -195 & 27 & \\
31−& & Neptune & 102 & 49,528 & 1638 & 11.0 & 16.1 & 4495.1 & -200 & 14
26+& & Neptune & 102 & 49,528 & 1638 & 11.0 & 16.1 & 4495.1 & -200 & 14 & \\
32−& \\ \addlinespace
33\multicolumn{2}{l}{Dwarf planets} & Pluto & 0.0146 & 2,370 & 2095 & 0.7 &
27\multicolumn{2}{l}{Dwarf planets} & Pluto & 0.0146 & 2,370 & 2095 & 0.7 &
34−153.3 & 5906.4 & -225 & 5 & Declassified as a planet in 2006. \\ \addlinespace
28+153.3 & 5906.4 & -225 & 5 & Declassified as a planet in 2006. \\
35\bottomrule
29\bottomrule
36\end{longtable}
30\end{longtable}
test/tables/students.latex+11−11
@@ -3,21 +3,21 @@
3 >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.50}}@{}}
3 >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.50}}@{}}
4\caption{List of Students}\tabularnewline
4\caption{List of Students}\tabularnewline
5\toprule
5\toprule
6−Student ID & Name \\ \addlinespace
6+Student ID & Name \\
7\midrule
7\midrule
8\endfirsthead
8\endfirsthead
9\toprule
9\toprule
10−Student ID & Name \\ \addlinespace
10+Student ID & Name \\
11\midrule
11\midrule
12\endhead
12\endhead
13−\multicolumn{2}{l}{Computer Science} \\ \addlinespace
13+\multicolumn{2}{l}{Computer Science} \\
14−3741255 & Jones, Martha \\ \addlinespace
14+3741255 & Jones, Martha \\
15−4077830 & Pierce, Benjamin \\ \addlinespace
15+4077830 & Pierce, Benjamin \\
16−5151701 & Kirk, James \\ \addlinespace
16+5151701 & Kirk, James \\
17−\multicolumn{2}{l}{Russian Literature} \\ \addlinespace
17+\multicolumn{2}{l}{Russian Literature} \\
18−3971244 & Nim, Victor \\ \addlinespace
18+3971244 & Nim, Victor \\
19−\multicolumn{2}{l}{Astrophysics} \\ \addlinespace
19+\multicolumn{2}{l}{Astrophysics} \\
20−4100332 & Petrov, Alexandra \\ \addlinespace
20+4100332 & Petrov, Alexandra \\
21−4100332 & Toyota, Hiroko \\ \addlinespace
21+4100332 & Toyota, Hiroko \\
22\bottomrule
22\bottomrule
23\end{longtable}
23\end{longtable}