tightlist error using Pandoc with Markdown

允我心安 提交于 2019-12-22 04:59:24

问题


I am using pandoc v. 1.18 on Mac OS 10.12 to transform this markdown file to a pdf, using a simple command line:

# A list that does not work
- one
- two
- three

And I get this error:

! Undefined control sequence.
l.53 \tightlist

pandoc: Error producing PDF

How can this be solved?


回答1:


\tightlist was introduced with pandoc 1.14 (see this commit). The most probable cause for this error is that you are using a template from a previous version and did not update it. This can be fixed by adding a couple of lines to your latex template. They can be found at $DATA-DIR/templates/default.latex for regular latex and $DATA-DIR/templates/default.beamer for beamer. You'll need to add those two lines (before the \begin{document}):

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

To make sure this does not happen again with future evolution of the templates, it might be a good idea to fork the pandoc-templates repository.



来源:https://stackoverflow.com/questions/40438037/tightlist-error-using-pandoc-with-markdown

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!