# LuaLaTeX complains about \pdfinclusioncopyfonts

When I try to use LuaLaTeX to build a simple document as follows

\documentclass{article}

\pdfinclusioncopyfonts=1

\begin{document}
a
\end{document}


I got the following error complaining \pdfinclusioncopyfonts

This is LuaTeX, Version 0.95.0 (TeX Live 2016/Debian)
restricted system commands enabled.
(./test.tex
LaTeX2e <2017/01/01>
(using write cache: /home/hong/.texlive2016/texmf-var/luatex-cache/generic)(usi
ng read cache: /var/lib/texmf/luatex-cache/generic /home/hong/.texlive2016/texm
f-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.081 seconds
Babel <3.9r> and hyphenation patterns for 1 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo(compiling luc: /var/li
ong/.texlive2016/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.luc
)))
! Undefined control sequence.
l.3 \pdfinclusioncopyfonts
=1


But PDFLaTeX can successfully build the document. Looks like LuaLaTeX is supposed to support that option. Am I missing anything?

• \RequirePackage{luatex85} before \documentclass should solve the issue. – egreg Feb 11 '17 at 23:30

Starting from version 0.95, LuaTeX has removed \pdfinclusioncopyfonts changing it into

\pdfvariable inclusioncopyfonts


so the correct syntax would be

\documentclass{article}

\pdfvariable inclusioncopyfonts=1

\begin{document}
a
\end{document}


However, there's the package luatex85 that comes to the rescue in this and several other cases where LuaTeX did similar changes:

\RequirePackage{luatex85}
\documentclass{article}

\pdfinclusioncopyfonts=1

\begin{document}
a
\end{document}


It's a good idea to add the top line to every file you plan to compile with LuaLaTeX. The luatex85 package will do nothing if the current engine is not LuaTeX version 0.95 or later.

• Note that luatex85 is meant to allow an easy transition here but the expectation is that LuaTeX-dependent documents will be updated to use the new primitives – Joseph Wright Feb 12 '17 at 10:22
• @JosephWright I'd be happier if the LaTeX kernel provides some interface, such as \setpdfvariable{inclusioncopyfonts}{1}, which could be made engine independent. – egreg Feb 12 '17 at 10:25
• @egreg LaTeX3 is just around the corner, right? :P – Manuel Feb 12 '17 at 11:10