Closed Lenchik closed 8 years ago
Hmm yes, in general it isn't possible to "fake" a primitive by a macro and get the same number of expansion steps, but the hyperxmp package assumes \pdfcreationdate just takes one expansion step to return the date.
For most of the \pdffeedback cases I think that's unavoidable, for example if you try to remove one layer of expansion from \pdffontname, either by using edef or a chain of \expandafter then you get an error about the missing font identifier. \def\pdffontname {\pdffeedback fontname}
so you have to use \def.
However as creationdate doesn't take any more arguments and is essentially a constant I think you are probably correct that edef is safe here, and certainly works better for this example. @josephwright ??
Yes, though Hans shows this as a \def
in the LuaTeX manual. Probably make the change for now and revisit if it goes wrong later!
OK I added the edef but actually luatex85 isn't enough to give compatibility for the package it now says
Package hyperxmp Warning: Unrecognized hyperref driver `hluatex'.
(hyperxmp) qq205.tex's XMP metadata will *not* be
(hyperxmp) embedded in the resulting file.
Until hyperxmp is updated you would need
\RequirePackage{luatex85}
\documentclass{book}
\usepackage[pdftex]{hyperref}
\usepackage{hyperxmp}
\begin{document}
Some text
\end{document}
so that hyperref stays in pdftex mode as well.
I just mailed Scott Pakin, the hyperxmp author, pointing to this thread. The changes required to make the package work without luatex85.sty would not be large so hopefully this situation is only temporary.
Great!
you are probably correct that edef is safe here
I am glad it worked. Every time reading theory and examples of expansions they look pretty straightforward, but then real issues come... as mindblowing disaster for me.
New version uploaded to ctan (will take a day or so to appear in distributions)
All in the code.
luatex85
version 1.2 fromtlnet
update of TeXLive 2016.