1

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).

Show.vars
  • 21
  • 1
  • 4
  • 1
    This question on [tex.se](http://tex.stackexchange.com/questions/295126/xelatex-with-fontspec-gives-undefined-control-sequence-error-after-miktex-upda) suggests you may need to update texlive. you should also update pandoc, as 1.12 is quite old. If this doesn't work, check wether you have a custom latex template in your path and post what you added to the standard template – scoa May 11 '16 at 10:04
  • I was update the pandoc and install texlive-full from official site. Now I have `pandoc 1.17.0.2`. Also I didn't add changes to default templates. But xelatex not working anyway. Here is [my default template for latex](https://gist.github.com/Show-vars/1753e5688541ebb8e32edc4ce28b6b37) – Show.vars May 11 '16 at 13:53
  • what font are you using/what other options? your template works fine on my machine (pandoc 1.17.0.1 and texlive 2014) – scoa May 11 '16 at 14:36

1 Answers1

1

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.

Community
  • 1
  • 1
Show.vars
  • 21
  • 1
  • 4