66

I was converting 'lecture1.md' file I made via Rstudio into 'lecture1.pdf' using Pandoc at Mac Terminal.

and I got this error message :

! Undefined control sequence.
<recently read> \tightlist 

l.213 \end{frame}

pandoc: Error producing PDF from TeX source
make: *** [lecture1.pdf] Error 43

What's strange thing is the same procedure with same files works with my colleague's computer.

Anyone's any comments would be helpful, and I'd appreciate them.

4
  • 1
    Compare the log-files to find out what is different on your colleagues computer. Commented Jul 28, 2015 at 8:32
  • @Ulrike Fischer Could you give me some tips where I can find the log files ? I'm not familiar with those stuff.
    – inmybrain
    Commented Jul 28, 2015 at 8:41
  • Use pandoc to create a standalone latex file and then compile this separatly. Commented Jul 28, 2015 at 9:02
  • @Ulrike Fischer Thx for your help and kindness!
    – inmybrain
    Commented Jul 29, 2015 at 9:05

3 Answers 3

82

The writer.latex file in Pandoc's source code currently defines \tightlist as:

\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}

This is also currently the case in the default LaTeX template, from the jgm/pandoc-templates project on Github.

For posterity, here is a link to the most up-to-date LaTeX default template:

2
  • 3
    The \tightlist problem seems to arise only when using - to build the list, and not when using *. (Tested with pandoc 1.17.0.3, used through R Markdown in RStudio on Mac OS X.)
    – Fr.
    Commented Jun 17, 2017 at 18:21
  • 2
    @Fr. \tightllist appears when using * too (pandoc 2.7.3).
    – jadelord
    Commented Jul 30, 2019 at 19:21
30

I hit the same problem. It seems that pandoc started using \tightlist in \begin{itemize} sections.

My workaround was simply to add an empty macro for \tightlist to my template file (I run pandoc with --template=mytemplate.tex):

\def\tightlist{}

1
  • simple and noninvasive. Perfect. It works. Commented Feb 24, 2018 at 22:44
18

Pandoc doesn't use \tightlist if you leave a blank line between each item, e.g.

- one

- two

versus

- one
- two

The same is true for enumerated lists. This is the LaTeX version of "loose" and "compact" lists documented here: http://pandoc.org/MANUAL.html#lists (h/t mb21).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .