aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs2
-rw-r--r--tests/tables.latex14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 2dcbf62bf..e4e882b8c 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -591,7 +591,7 @@ blockToLaTeX (Table caption aligns widths heads rows) = do
rows' <- mapM (tableRowToLaTeX False aligns widths) rows
let colDescriptors = text $ concat $ map toColDescriptor aligns
modify $ \s -> s{ stTable = True }
- return $ "\\begin{longtable}[c]" <>
+ return $ "\\begin{longtable}[]" <>
braces ("@{}" <> colDescriptors <> "@{}")
-- the @{} removes extra space at beginning and end
$$ capt
diff --git a/tests/tables.latex b/tests/tables.latex
index 850629499..96cbc9579 100644
--- a/tests/tables.latex
+++ b/tests/tables.latex
@@ -1,6 +1,6 @@
Simple table with caption:
-\begin{longtable}[c]{@{}rlcl@{}}
+\begin{longtable}[]{@{}rlcl@{}}
\caption{Demonstration of simple table syntax.}\tabularnewline
\toprule
Right & Left & Center & Default\tabularnewline
@@ -18,7 +18,7 @@ Right & Left & Center & Default\tabularnewline
Simple table without caption:
-\begin{longtable}[c]{@{}rlcl@{}}
+\begin{longtable}[]{@{}rlcl@{}}
\toprule
Right & Left & Center & Default\tabularnewline
\midrule
@@ -31,7 +31,7 @@ Right & Left & Center & Default\tabularnewline
Simple table indented two spaces:
-\begin{longtable}[c]{@{}rlcl@{}}
+\begin{longtable}[]{@{}rlcl@{}}
\caption{Demonstration of simple table syntax.}\tabularnewline
\toprule
Right & Left & Center & Default\tabularnewline
@@ -49,7 +49,7 @@ Right & Left & Center & Default\tabularnewline
Multiline table with caption:
-\begin{longtable}[c]{@{}clrl@{}}
+\begin{longtable}[]{@{}clrl@{}}
\caption{Here's the caption. It may span multiple lines.}\tabularnewline
\toprule
\begin{minipage}[b]{0.13\columnwidth}\centering\strut
@@ -98,7 +98,7 @@ Here's another one. Note the blank line between rows.
Multiline table without caption:
-\begin{longtable}[c]{@{}clrl@{}}
+\begin{longtable}[]{@{}clrl@{}}
\toprule
\begin{minipage}[b]{0.13\columnwidth}\centering\strut
Centered Header
@@ -134,7 +134,7 @@ Here's another one. Note the blank line between rows.
Table without column headers:
-\begin{longtable}[c]{@{}rlcr@{}}
+\begin{longtable}[]{@{}rlcr@{}}
\toprule
12 & 12 & 12 & 12\tabularnewline
123 & 123 & 123 & 123\tabularnewline
@@ -144,7 +144,7 @@ Table without column headers:
Multiline table without column headers:
-\begin{longtable}[c]{@{}clrl@{}}
+\begin{longtable}[]{@{}clrl@{}}
\toprule
\begin{minipage}[t]{0.13\columnwidth}\centering\strut
First