[luatex] Undefined Control Sequence with attachfile package
Reinhard Kotucha
reinhard.kotucha at web.de
Thu Jul 13 03:12:16 CEST 2017
On 2017-07-12 at 17:07:34 -0500, Jon Hood wrote:
> Attempting to run lualatex on the following results in an error. Am I
> doing something wrong with the attachfile package? It says that it
> supports luatex, and it works fine when I use pdflatex...
>
> $ lualatex --version
> This is LuaTeX, Version 1.0.4 (TeX Live 2017/Cygwin)
>
> $ grep -A 1 ProvidesPackage
> /usr/share/texmf-dist/tex/latex/attachfile/attachfile.sty
> \ProvidesPackage{attachfile}
> [2016/09/18 v1.9 PDF 1.3+ file attachment]
>
> $ cat mwe.tex
> \documentclass{article}
> \usepackage{attachfile}
> \begin{document}
> \attachfile[icon=Paperclip, mimetype=text/plain]{mwe.tex}
> \end{document}
>
> $ lualatex mwe
> This is LuaTeX, Version 1.0.4 (TeX Live 2017/Cygwin)
> restricted system commands enabled.
> (./mwe.tex
> LaTeX2e <2017-04-15>
> (using cache: /var/lib/texmf/luatex-cache/generic)
> luaotfload | main : initialization completed in 0.141 seconds
> Babel <3.10> and hyphenation patterns for 1 language(s) loaded.
> (/usr/share/texmf-dist/tex/latex/base/article.cls
> Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
> (/usr/share/texmf-dist/tex/latex/base/size10.clo(load luc: /var/lib/texmf/luate
> x-cache/generic/fonts/otl/lmroman10-regular.luc)))
> (/usr/share/texmf-dist/tex/latex/attachfile/attachfile.sty
> (/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
> (/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
> (/usr/share/texmf-dist/tex/latex/tools/calc.sty)
> (/usr/share/texmf-dist/tex/latex/graphics/color.sty
> (/usr/share/texmf-dist/tex/latex/graphics-cfg/color.cfg)
> (/usr/share/texmf-dist/tex/latex/graphics-def/luatex.def
> (/usr/share/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
> (/usr/share/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)))
> (/usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
> (/usr/share/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
> (/usr/share/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty
> (/usr/share/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua)))
> (/usr/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
> (/usr/share/texmf-dist/tex/latex/oberdiek/auxhook.sty)
> (/usr/share/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
> (/usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def)
> (/usr/share/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
> (/usr/share/texmf-dist/tex/latex/url/url.sty))
>
> Package hyperref Message: Driver (autodetected): hluatex.
>
> (/usr/share/texmf-dist/tex/latex/hyperref/hluatex.def
> (/usr/share/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))) (./mwe.aux)
> (/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
> [Loading MPS to PDF converter (version 2006.09.02).]
> ) (/usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
> (/usr/share/texmf-dist/tex/generic/oberdiek/gettitlestring.sty)) (./mwe.out)
> (./mwe.out)<<mwe.tex>>
> ! Undefined control sequence.
> \atfi at set@appearance ...x }}\immediate \pdfxform
> \atfi at appearancebox \edef ...
>
> l.4 ...icon=Paperclip, mimetype=text/plain]{mwe.tex}
Does it work if you add the line
\let\pdfxform\saveboxresource
to the preamble?
Some pdftex primitives were renamed in luatex recently. I vaguely
remember that there is a LaTeX package which provides backwards
compatibility but I don't remember its name.
Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
------------------------------------------------------------------
More information about the luatex
mailing list