首页 > 有关pandoc使用xelatex引擎将markdown为pdf文件的一个报错

有关pandoc使用xelatex引擎将markdown为pdf文件的一个报错

#出错重现#
我使用命令

pandoc dist/trpl-2015-05-15.md --from='markdown+grid_tables+pipe_tables+raw_html+implicit_figures+footnotes+intraword_underscores+auto_identifiers-inline_code_attributes' --smart --normalize --standalone --self-contained --highlight-style=tango --chapters --table-of-contents --variable papersize='a4paper' --variable monofont='Source Sans Pro' --template=lib/template.tex --latex-engine=latex --to=latex --output=dist/trpl-2015-05-15-a4.pdf

报错,报错信息如下

! Undefined control sequence.
l.196 \tightlist

pandoc: Error producing PDF from TeX source

问题:

我在template.tex中并没有找到这个tightlist 请问该怎么处理?谁能够帮助我解决一下,搜索了很多后只是在pandoc.org上找到这样的话

LaTeX, Beamer templates:

Provide \tightlist, which is now used by the LaTeX writer.
Use polyglossia in beamer (#85).
Use bibliography instead of biblio-files (#1661). Also use \addbibresource instead of \bibliography for biblatex.
Added setotherlanguages in polyglossia. This uses an otherlang variable that is derived from a comma-separated list in lang; the last language is mainlang and the others are otherlang.

其他信息

我的版本库在osc上
rust编程语言

由于template.tex文件比较大,所以不贴在这里,对这个不便表示歉意

template.text 在lib目录下
整个脚本使用的是ruby 调用pandoc来生成pdf

在重装mac之前的时候可以正常生成pdf 但是重装系统以后我下载了最新的macTex 然后就不能够自动生成pdf了
生成所有文件的命令是ruby buil.rb

pandoc安装版本 https://github.com/jgm/pandoc/releases/1.15
macTex安装版本 http://tug.org/mactex/mactex-download.html


此问题已经得到解决 解决方式就是在 template.tex中增加以下代码

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

详细解决信息可以参见这里
https://github.com/killercup/trpl-ebook/issues/18#issuecomment-1198926...

【热门文章】
【热门文章】