diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2022-03-30 10:07:09 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2022-03-30 10:07:09 -0700 |
| commit | 5f0bfd41a80aaf4d05c37357a317a6694ec338ec (patch) | |
| tree | cf4ce4e9ef177ec133e36ee5dd44f80440822cbb /src | |
| parent | bb5f0f7b761fbee084af4cc06210efd0331cd048 (diff) | |
LaTeX writer: add () after booktabs rules.
These commands take optional arguments with () and [],
which can lead to problems if the content of the table
cell begins with these characters.
Closes #8001.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/LaTeX/Table.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX/Table.hs b/src/Text/Pandoc/Writers/LaTeX/Table.hs index ba9d2fc99..58fd3a251 100644 --- a/src/Text/Pandoc/Writers/LaTeX/Table.hs +++ b/src/Text/Pandoc/Writers/LaTeX/Table.hs @@ -52,7 +52,7 @@ tableToLaTeX inlnsToLaTeX blksToLaTeX tbl = do else ($$ text "\\endfirsthead") <$> headToLaTeX blksToLaTeX thead head' <- if isEmptyHead thead - then return "\\toprule" + then return "\\toprule()" -- avoid duplicate notes in head and firsthead: else headToLaTeX blksToLaTeX (if isEmpty firsthead @@ -71,7 +71,7 @@ tableToLaTeX inlnsToLaTeX blksToLaTeX tbl = do $$ head' $$ "\\endhead" $$ vcat rows' - $$ "\\bottomrule" + $$ "\\bottomrule()" $$ "\\end{longtable}" $$ captNotes $$ notes @@ -161,7 +161,7 @@ headToLaTeX :: PandocMonad m headToLaTeX blocksWriter (Ann.TableHead _attr headerRows) = do rowsContents <- mapM (rowToLaTeX blocksWriter HeaderCell . headerRowCells) headerRows - return ("\\toprule" $$ vcat rowsContents $$ "\\midrule") + return ("\\toprule()" $$ vcat rowsContents $$ "\\midrule()") -- | Converts a row of table cells into a LaTeX row. rowToLaTeX :: PandocMonad m |
