Undefined control sequence error while converting from markdown to PDF with pandoc and xelatex

4.1k Views Asked by At

I'm making some documentation for our project, but I can't enable xelatex in pandoc to setup custom fonts. If I set --latex-engine xelatex pandoc will show that error:

pandoc: Error producing PDF from TeX source.
! Undefined control sequence.
l.17 \sys_if_engine_luatex:T

Here is a command that I run:

pandoc -s --latex-engine xelatex -f markdown build.md -o docs.pdf

I use Ubuntu 14.04 LTS, pandoc 1.12.2.1 and XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013/Debian).

1

There are 1 best solutions below

0
On

Oops... after removing texlive 2013 with apt-get and installing manualy texlive 2015 pandoc will use old texlive (!!!). After that steps and setting PATH to /usr/local/texlive/2015/bin/x86_64-linux/ pandoc will finaly compile my file with xelatex.