Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid and multiline tables not working in 2.11.3.2 (pdf) #7002

Closed
gnpan opened this issue Jan 3, 2021 · 5 comments
Closed

Grid and multiline tables not working in 2.11.3.2 (pdf) #7002

gnpan opened this issue Jan 3, 2021 · 5 comments

Comments

@gnpan
Copy link

gnpan commented Jan 3, 2021

Just updated to pandoc version 2.11.3.2 and any grid or multiline tables give an error producing PDF. Simple or pipe tables are OK.
MWE:
File test.txt:

-------------------------------------------------------------
 Centered   Default           Right Left
  Header    Aligned         Aligned Aligned
----------- ------- --------------- -------------------------
   First    row                12.0 Example of a row that
                                    spans multiple lines.

  Second    row                 5.0 Here's another one. Note
                                    the blank line between
                                    rows.
-------------------------------------------------------------

Table: Here's the caption. It, too, may span
multiple lines.

Command:

pandoc -o test.pdf test.txt

Result:

Error producing PDF.
! Undefined control sequence.
<argument> @{} >{\centering \arraybackslash 
                                            }p{(\columnwidth - 6\tabcolsep )...
l.70 ...umnwidth - 6\tabcolsep) * \real{0.36}}@{}}
@tarleb
Copy link
Collaborator

tarleb commented Jan 3, 2021

I cannot reproduce this. Could you be using a custom LaTeX template unintentionally? Check your ~/.pandoc/templtates and ~/.local/share/pandoc/templates directories. If there's a default.latex file in there, please try adding \usepackage{array} to the preamble.

@gnpan
Copy link
Author

gnpan commented Jan 3, 2021

Ah yes, although I was not calling a custom template, there was an old default.latex file lurking in my .pandoc folder, so I assume it was picking this up. I deleted it and all is well.
Thanks!

@gnpan gnpan closed this as completed Jan 3, 2021
@mirh
Copy link

mirh commented Mar 11, 2021

See ismayc/thesisdown#122 (comment) for the precise culprit

@neuged
Copy link

neuged commented Feb 22, 2023

Combining the link provided by @mirh and the comment by @tarleb (thank you both!) I needed to add array as well as calc to my template, to make grid tables work as before, e.g.:

\usepackage{array,calc}

@mattharrison
Copy link

Thanks @neuged , I just updated my homebrew MacTex install and all my non-simple tables were broken until I added

\usepackage{array,calc}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants