是否可以将“lualatex”的 DVI 输出与“fontspec”一起使用而不会出现与字体相关的错误?

是否可以将“lualatex”的 DVI 输出与“fontspec”一起使用而不会出现与字体相关的错误?

是否可以使用lualatex的 DVI 输出而fontspec不会出现与字体相关的错误?我想使用 的(基于 eps 的)输出sagetexlualatex生成的文档fontspec。由于sagetex使用 eps 图形,因此我只能在文档中使用它,如果我使用 的lualatexDVI 输出。由于我想要fontspec与其一起使用(加载 Helvetica 并将其用作文档中文本的字体),我可以让 lualatex 产生与之兼容的 DVI 输出吗fontspec

答案1

如果我使用以下方法编译此文件dvilualatex

\documentclass{article}
\usepackage{fontspec}
\begin{document}
Some test
\end{document}

响应dvitype

This is DVItype, Version 3.6 (TeX Live 2016)
Options selected:
  Starting page = * 
  Maximum number of pages = 1000000
  Output level = 4 (the works)
  Resolution = 300.00000000 pixels per inch
numerator/denominator=25400000/473628672
magnification=1000;       0.00006334 pixels per DVI unit
' LuaTeX output 2017.02.05:0007'
Postamble starts at byte 173.
maxv=41484288, maxh=26673152, maxstackdepth=3, totalpages=1
Font 14: [lmroman10-regular]:+tlig;---not loaded, TFM file can't be opened! 

45: beginning of page 1 
90: push 
level 0:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) 
91: push 
level 1:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) 
92: push 
level 2:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) 
93: right3 5046272 h:=0+5046272=5046272, hh:=320 
[ ]
97: down3 4128768 v:=0+4128768=4128768, vv:=262 
101: fntdef1 14: [lmroman10-regular]:+tlig;---this font wasn't loaded before!
---not loaded, TFM file can't be opened! 
143: fntnum14 invalid font selection: font 14 was never defined! current font is UNDEFINED! 
144: setchar83 character 83 invalid in font UNDEFINED! h:=5046272+0=5046272, hh:=320 
145: setchar111 character 111 invalid in font UNDEFINED! h:=5046272+0=5046272, hh:=320 
146: setchar109 character 109 invalid in font UNDEFINED! h:=5046272+0=5046272, hh:=320 
147: setchar101 character 101 invalid in font UNDEFINED! h:=5046272+0=5046272, hh:=320 
148: right3 218235 h:=5046272+218235=5264507, hh:=333 
152: setchar116 character 116 invalid in font UNDEFINED! h:=5264507+0=5264507, hh:=333 
153: setchar101 character 101 invalid in font UNDEFINED! h:=5264507+0=5264507, hh:=333 
154: setchar115 character 115 invalid in font UNDEFINED! h:=5264507+0=5264507, hh:=333 
155: setchar116 character 116 invalid in font UNDEFINED! h:=5264507+0=5264507, hh:=333 
[Some test]
156: pop 
level 2:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) 
157: pop 
level 1:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) 
158: push 
level 1:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) 
159: right4 15204352 h:=0+15204352=15204352, hh:=963 
[ ]
164: down4 41484288 v:=0+41484288=41484288, vv:=2628 
169: setchar49 character 49 invalid in font UNDEFINED! h:=15204352+0=15204352, hh:=963 
[1]
170: pop 
level 1:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) 
171: pop 
level 0:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) 
172: eop 

如您所见,它已写出,但无法从中得出任何有意义的信息。特别是,dvips它无法处理 OpenType 字体,而且目前没有可以处理的 DVI 驱动程序。

另一方面,将 EPS 文件转换为 PDF 非常容易:TeX Live(也称为 MiKTeX)提供了epstopdf用于此目的的脚本,并且编译lualatex将即时进行转换。

相关内容