2

Is it possible to use lualatex's DVI output with fontspec without getting font-related errors? I want to use the (eps-based) output of sagetex with a lualatex generated document with fontspec. As sagetex uses eps graphics, the only way I can use it in a document is if I use lualatex's DVI output. As I also want to use fontspec with it (to load Helvetica and use that as the font for text in my document), can I get lualatex to produce DVI output that is compatible with fontspec.

  • The DVI format doesn't support OpenType fonts. With the epstopdf package you can use EPS also with direct PDF output. – egreg Nov 13 '13 at 13:25
  • 1
    No. There is no driver which can process such a dvi. Use epstopdf to convert your eps graphics to pdf. – Ulrike Fischer Nov 13 '13 at 13:26
3

If I compile this file with dvilualatex

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

the response of dvitype is

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 

As you see, it is written out, but no sensible information can be derived from it. In particular, dvips is not able to cope with OpenType fonts and there is no DVI driver which can, at the moment.

On the other hand, converting EPS files to PDF is quite easy: TeX Live (also MiKTeX) provide the epstopdf script for the purpose and compiling with lualatex will do the conversion on the fly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.