在我的 MacBook(OSX Mountain Lion)上,我曾经使用这个 Pandoc 命令将 Markdown 转换为 PDF:
$ markdown2pdf -N -o pandoc_output.pdf --xetex --toc --template=mytemplate.tex myfile.md
但markdown2pdf
不再有效,并且--xetex
选项 inmarkdown2pdf -N -o ../../Desktop/pandoc_output.pdf --xetex --toc --template=mytemplate-headers-garamond_date.tex
已弃用。
如果我这样做:
$ pandoc -N -o Desktop/pandoc_output.pdf --xetex --toc --template=mytemplate.tex myfile.md
我明白了:
pandoc: unrecognized option `--xetex'
但如果我拿出来--xetex
这样做:
$ pandoc -N -o Desktop/pandoc_output.pdf --toc --template=mytemplate.tex myfile.md
然后我得到这个:
pandoc: Error producing PDF from TeX source.
! Package hyperref Error: Wrong driver option `xetex',
(hyperref) because XeTeX is not detected.
See the hyperref package documentation for explanation.
Type H <return> for immediate help.
...
l.3925 \ProcessKeyvalOptions{Hyp}
解决方案是什么?