jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.57k stars 3.38k forks source link

[Beamer Output] Table caption with markdown triggers error AGAIN #2414

Closed bozito closed 9 years ago

bozito commented 9 years ago

Hi, It seems that there are still some issues with tables and beamer. The following file: tst.mmd 1 # Part 1 2 3 ## Slide 1 4 5 pipe|table 6 ----|----- 7 1 | 2

Results in an error when trying to create a beamer pdf:

pandoc_test $ pandoc -t beamer -o tst.pdf tst.mmd pandoc: Error producing PDF from TeX source. ! Undefined control sequence. \beamer@doifinframe ...ble}[c]{@{}ll@{}} \toprule \addlinespace pipe & table... l.67 \end{frame}

The various fix proposed in #1200 (adding \usepackage{caption} in the header or the beamer template) does not solve the problem. Should #1200 be reopened?

Cheers,

Antoine

bozito commented 9 years ago

Hehe, I've just found a fix: I added caption and booktabs in the beamer preamble:

47 $if(tables)$ 48 \usepackage{longtable} 49 % These lines are needed to make table captions work with longtable: 50 \makeatletter 51 \def\fnum@table{\tablename~\thetable} 52 \makeatother 53 \usepackage{caption} 54 \usepackage{booktabs} 55 $endif$

jgm commented 9 years ago

The default beamer template has included booktabs since Dec. 2013 and caption since April 2014. Are you using old versions of templates for some reason? (Maybe in ~/.pandoc/templates?) Are you using a recent version of pandoc?

bozito commented 9 years ago

The version of pandoc I'm using is the one provided by the depos of Ubuntu 14.04 (the current LTS). I have found other issues that might be related to this "old" version. Is there a ppa with a newer version?

jgm commented 9 years ago

There's a new 64-bit deb I maintain at https://github.com/jgm/pandoc/releases

+++ bozito [Sep 27 15 00:22 ]:

The version of pandoc I'm using is the one provided by the depos of Ubuntu 14.04 (the cureent LTS). I have found other issues that might be related to this "old" version. Is there a ppa with a newer version?

— Reply to this email directly or [1]view it on GitHub.

References

  1. https://github.com/jgm/pandoc/issues/2414#issuecomment-143526459
bozito commented 9 years ago

OK, I'm using it and it solves the problem. But where are the default templates with this package? With the ubuntu package they were in /usr/share/pandoc/data/templates/ Are they hardcoded in the binary?

jgm commented 9 years ago

It depends on how pandoc was compiled. It is possible to compile pandoc with an option that bakes the data files into the binary. And that's what we do with the distribution binaries (to make them more portable).

+++ bozito [Oct 02 15 08:08 ]:

OK, I'm using it and it solves the problem. But where are the default templates with this package? With the ubuntu package they were in /usr/share/pandoc/data/templates/ Are they hardcoded in the binary?

— Reply to this email directly or [1]view it on GitHub.

References

  1. https://github.com/jgm/pandoc/issues/2414#issuecomment-145054952