Open lstonys opened 7 months ago
the command does not work in dvi mode so it is not clear that lautex85 should do anything here. Also can you clarify your newtxmath comment, I get no error from
\documentclass{article}
%\usepackage{luatex85}
\usepackage[varvw]{newtxmath}
\makeatletter
\ifx\pdfglyphtounicode\@undefined \else
\pdfgentounicode=1
\pdfglyphtounicode{nPerp}{2AEB 2215}% .. ..
\fi
\makeatother
\begin{document}
foo
\end{document}
Also can you clarify your newtxmath comment, I get no error from
If you load luatex85
and run in DVI mode with LuaTeX then you get an error as \pdfglyphtounicode
is defined.
yes so I see. I suppse pdfglyphtounicode could be defined to gobble if outputmode is not pdf at the point the package is loaded but it's not clear that is really the expected result
or perhaps better, just not define it in that case, so then newtxmath's existing guard would work
it is not only in newtxmath. A few more packages in texlive uses these commands too. I would vote fore the gobbling in DVI mode :)
A few more packages in texlive uses these commands too.
Well yes but really to work properly with LuaTeX they should be using the interfaces it provide, or (I suspect) bailing out as the font setup is inappropriate. My concern is that you are asking to support per-0.85 interfaces in LuaTeX for ever, rather than pushing the package authors to consider their engine coverage properly. luatex85
was only ever meant as a stop-gap around the release of LuaTeX v.0.85 several years ago.
@josephwright I agree that we should not support packages using luatex85 but newtxmath isn't really doing that: it has
\ifx\pdfglyphtounicode\@undefined
do nothing
\else
assume it works
\fi
It is not using this package to define the command, it's just that if the user loads this package it breaks. I am wary of defining it to gobble and silently doing the wrong thing, but if we didn't define it at all in cases where it doesn't work existing package guards as above would work.
Alternatively as @u-fischer suggested elsewhere possibly some lua could be inserted at the format level so that the command did work in dvi mode.
problem is that it works in latex
(have no idea what it does with it) and luatex
so others will expect that it will "work" in dvilualatex
as well.
\pdfglyphtounicode
from\usepackage{luatex85}
raises error with dvilualatex engine. This command used in newtxmath, newpxmath, and some other packages. If it can't work in DVI mode then could be defined as gobbled in luatex85.MWE:
ERROR: