我试图在我的文档中使用Arial字体,并将其从减价转换为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。
发布于 2018-04-30 08:19:24
在使用Pandoc:创建pdf时使用LuaTex
pandoc test.txt --pdf-engine=lualatex -o test.pdf因此,适用于XeTex:
pandoc test.txt --pdf-engine=xelatex -o test.pdf来自Pandoc 手册的
--pdf-engine=pdflatex|lualatex|xelatex|wkhtmltopdf|weasyprint|prince|context|pdfroff 在生成PDF输出时使用指定的引擎。默认的是pdflatex。如果引擎不在您的路径中,则可以在此处指定引擎的完整路径。
看看手册的演示科 -大多数用例都在那里。
https://stackoverflow.com/questions/50092813
复制相似问题