我可以将 Pandoc 排版引擎更改为 XeTeX 或 LuaTex 吗?
Can I change the Pandoc typesetting engine to XeTeX or LuaTex?
我正在尝试在我的文档中使用 Arial 字体并将其从 markdown 转换为 Latex。我在乳胶模板中包含以下内容:
\usepackage{fontspec}
\setmainfont{Arial}
当我正常使用它时,这有效并将字体更改为 Arial,但是当我使用 Pandoc 转换为 PDF 时,出现错误:
Error producing PDF.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX.
!
! You must change your typesetting engine to, e.g., "xelatex" or
! "lualatex"instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.28 \msg_fatal:nn {fontspec} {cannot-use-pdftex}
它说这个包需要 XeTeX 或 LuaTex。我已经尝试了很多方法来将字体更改为 Arial,但到目前为止没有任何效果。
我用OS X.
在使用 Pandoc 创建 pdf 时使用 LuaTex:
pandoc test.txt --pdf-engine=lualatex -o test.pdf
相应地申请 XeTex:
pandoc test.txt --pdf-engine=xelatex -o test.pdf
来自 Pandoc Manual:
--pdf-engine=pdflatex|lualatex|xelatex|wkhtmltopdf|weasyprint|prince|context|pdfroff
Use the specified engine when producing PDF output. The default is
pdflatex. If the engine is not in your PATH, the full path of the
engine may be specified here.
查看手册的 Demo Section - 大多数用例都包含在其中。
我正在尝试在我的文档中使用 Arial 字体并将其从 markdown 转换为 Latex。我在乳胶模板中包含以下内容:
\usepackage{fontspec}
\setmainfont{Arial}
当我正常使用它时,这有效并将字体更改为 Arial,但是当我使用 Pandoc 转换为 PDF 时,出现错误:
Error producing PDF.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX.
!
! You must change your typesetting engine to, e.g., "xelatex" or
! "lualatex"instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.28 \msg_fatal:nn {fontspec} {cannot-use-pdftex}
它说这个包需要 XeTeX 或 LuaTex。我已经尝试了很多方法来将字体更改为 Arial,但到目前为止没有任何效果。
我用OS X.
在使用 Pandoc 创建 pdf 时使用 LuaTex:
pandoc test.txt --pdf-engine=lualatex -o test.pdf
相应地申请 XeTex:
pandoc test.txt --pdf-engine=xelatex -o test.pdf
来自 Pandoc Manual:
--pdf-engine=pdflatex|lualatex|xelatex|wkhtmltopdf|weasyprint|prince|context|pdfroff
Use the specified engine when producing PDF output. The default is pdflatex. If the engine is not in your PATH, the full path of the engine may be specified here.
查看手册的 Demo Section - 大多数用例都包含在其中。