Excluding pdflatex
, which is not an option since it cannot be used together with fontspec
, let's try to understand whether xelatex
or lualatex
can be used.
The file xmpincl.sty
contains the following lines:
\RequirePackage{ifpdf}
\ifpdf\else
\PackageWarningNoLine{xmpincl}%
{Only pdflatex is supported by the xmpincl package}
\newcommand{\includexmp}[1]{%
\PackageError{xmpincl}%
{latex is not supported by the \protect\includexmp\space package}%
{You tried to include XMP metadata in DVI production.\MessageBreak
That doesn't work, and I friendly tried to warn you.\MessageBreak
Just continue and pretend nothing is wrong,\MessageBreak
but please remove the package or switch to pdflatex.}
}
\relax\expandafter\endinput
\fi
This means that it returns an error when you use \includexmp
if the \ifpdf
test is false.
You can use the following minimal file to test whether \ifpdf
returns true or false
\documentclass{article}
\usepackage{ifpdf}
\begin{document}
\ifpdf
\texttt{xmpincl} can be used
\else
\texttt{xmpincl} cannot be used
\fi
\end{document}
With lualatex
(beta-0.76.0-2013062820) I get

while with xelatex
(3.1415926-2.5-0.9999.3) I get

This means that with an up-to-date luatex
engine you should be able to use fontspec
together with xmpincl
.
hyperxmp
being more flexible in terms of how you construct the document remains true, and the same goes for its being more user-friendly at the cost of being somewhat less flexible in terms of what you can include.