\[\frac{\sin(α)}{\cos(α)}=\tan(α),\quad α≠0\]

Dviluatex compiler doesn't give any errors but the produced dvi-document cannot be opened. If I comment out unicode-math package then document is viewable but lacks all unicode symbols. Compiling to pdf with lualatex and xelatex works perfectly.

xdvi produces error:

pathsea:make_tex: Invalid fontname `[latinmodern-math.otf]:mode=base;script=math;language=DFLT;', contains '[' xdvi: Can't find pixel font [latinmodern-math.otf]:mode=base;script=math;language=DFLT;; using cmr10 instead at 600 dpi. xdvi-xaw: Fatal error: unknown op-code 130

Evince produces infinitely similar error messages:

kpathsea:make_tex: Invalid fontname `[latinmodern-math.otf]:mode=base;script=math;language=DFLT;', contains '['

$ fc-list | grep latinmodern-math :

/usr/share/texmf-dist/fonts/opentype/public/lm-math/latinmodern-math.otf: Latin Modern Math:style=Regular /usr/share/fonts/OTF/latinmodern-math.otf: Latin Modern Math:style=Regular

mwe.log: https://pastebin.com/KwDry3TG

Could be related to: dvilualatex cannot find fonts in fresh install of MacTeX 2017.

How can I get this to compile properly?

  • The Unicode math mode fonts are OpenType: they can't be loaded in DVI mode by dvips and similar (xdvipdfmx for XeTeX does know about them). Not sure if that is the answer you want ... – Joseph Wright Aug 12 '17 at 15:57
  • @JosephWright: That seems to be the case. I don't know much about fonts and I don't have very much expertise on tex or latex. Unicode-math seems to support few different fonts (ctan.org/pkg/unicode-math?lang=en). Can any of them be used in DVI mode? Or is there maybe any other workaround. I could of course map characters to corresponding commands with \DeclareUnicodeCharacter since I don't use too many of them. – Jarno_C-137 Aug 12 '17 at 17:12
  • 1
    @Jake_C-137 basically the dvi files made by dviluatex are not usable by anything unless you use luatex strictly like classic tex and use no opentype fonts. Why are you using dviluatex at all? – David Carlisle Aug 12 '17 at 19:00
  • It is normally not recommented to use \usepackage[T1]{fontenc} with luatex (certainly not if using unicode-math) unicode-math assumes you are using unicode fonts and T1 encoding implies 256 character fonts with legacy tex encoding. – David Carlisle Aug 12 '17 at 19:04
  • @JosephWright I'm trying to compile (not sure if that is correct word) my educational latex documents, some which contain complicated mathematics and complicated visual layout to html. I tried htlatex, which requires (?) intermediate dvi-output. I don't know whether it's good or bad approach. I now mapped unicode chars to corresponding latex commands and it works well. I also switched fontenc to fontspec for pdf-compilation. – Jarno_C-137 Aug 14 '17 at 13:04

Your Answer

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

Browse other questions tagged or ask your own question.