我一直在尝试使用Pandoc将一些Markdown转换为PDF文件.这是Pandoc不会为我转换的示例:
# Header!
## Sub Header
themselves derived respectively from the Greek ??????? i.e. 'anarchy'
Run Code Online (Sandbox Code Playgroud)
这只是我从维基百科数据库转储顶部抓取的东西.潘多克完全不喜欢这样.这是它给我的错误信息:
pandoc: Error producing PDF from TeX source.
! Package inputenc Error: Unicode char \u8:? not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...
l.53 ...es derived respectively from the Greek ?
Run Code Online (Sandbox Code Playgroud)
是否有一个命令开关我可以给它来解决这个问题?我尝试按照建议做这样的事情,但失败了:
iconv -t utf-8 test.md | pandoc -o test.pdf
Run Code Online (Sandbox Code Playgroud)
更新在遵循以下John的建议之前,请参阅此内容.
更新2这是最终使其正常工作的命令.希望这会帮助某人:
pandoc test2.md -o test2.pdf --latex-engine=xelatex --template=my.latex …