Latex 我可以将Pandoc排版引擎更改为XeTeX或LuaTex吗?

Latex 我可以将Pandoc排版引擎更改为XeTeX或LuaTex吗?,latex,pandoc,Latex,Pandoc,我试图在我的文档中使用Arial字体,并将其从markdown转换为latex。我在latex模板中包括以下内容: \usepackage{fontspec} \setmainfont{Arial} 当我正常使用它时,它可以工作并将字体更改为Arial,但当我使用Pandoc转换为PDF时,我得到错误: Error producing PDF. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Fatal fontspec error:

我试图在我的文档中使用Arial字体,并将其从markdown转换为latex。我在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}
生成PDF时出错。 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! 致命的fontspec错误:“无法使用pdftex” ! ! fontspec包需要XeTeX或LuaTeX。 ! ! 您必须将排版引擎更改为,例如,“Xeletex”或 ! “lualatex”而不是普通的“乳胶”或“pdflatex”。 ! ! 有关更多信息,请参阅fontspec文档。 ! ! 如需立即帮助,请键入H。 !............................................... l、 28\msg_致命:nn{fontspec}{无法使用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:

pandoc test.txt --pdf-engine=lualatex -o test.pdf
--pdf engine=pdflatex | lualatex | xelatex | wkhtmltofd | weasyprint | prince | context | pdfroff

生成PDF输出时使用指定的引擎。默认值是 pdflatex。如果发动机不在您的路径中,则发动机的完整路径 此处可指定发动机


请查看手册的详细信息-大部分用例都在这里介绍。

谢谢您告诉我!但现在我发现一个错误
文件ucharcat.sty未找到。
我搜索了template.latex文件,但它不在那里。这意味着
ucharcat.sty
要么未安装,要么位于latex未查找它的位置。因为这是一个完全不同的问题:继续搜索
sty not found
。如果这无助于解决问题,你可以在那里问一个新问题。