5

MWE:

\documentclass{beamer}

%\usepackage[x-1a]{pdfx}

\begin{document}
  \section{Présentation}
  \begin{frame}{First Frame}
    Hello, world!
  \end{frame}
  \section{Techniques}
  \begin{frame}{First Frame}
    Hello, world!
  \end{frame}
  \section{Mise en œuvre}
  \begin{frame}{First Frame}
    Hello, world!
  \end{frame}
  \section{Démonstration}
  \begin{frame}{First Frame}
    Hello, world!
  \end{frame}
  \section{Conclusions}
  \begin{frame}{First Frame}
    Hello, world!
  \end{frame}
\end{document}

This example compiles successfully (albeit with the annoyances associated with using non-ASCII characters). However, when I enable pdfx, I am plagued by these errors:

! LaTeX Error: Option clash for package xcolor.

See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ...

l.730 \else

or (in this case using a-1b):

! Package kvsetkeys Error: Undefined key `pdftex,pdfa,pdfversion=1.4'.

See the kvsetkeys package documentation for explanation. Type H for immediate help. ...

l.806 } %

Is it possible to use pdfx with the beamer class?

3
  • Untested, but try \RequirePackage[x-1a]{pdfx} before \documentclass. Nov 13, 2016 at 13:57
  • Beamer bails out: ! LaTeX Error: Option clash for package hyperref.
    – amyspark
    Nov 13, 2016 at 15:18
  • It is possible to avoid the error Option clash by starting the document with \RequirePackage[x-1a]{pdfx} \documentclass[hyperref={implicit=false}]{beamer}. However, after that the page dimensions are changed, so it doesn't really work.
    – gernot
    Nov 13, 2016 at 16:19

1 Answer 1

4

The error for xcolor can be cured by

\documentclass[xcolor={cmyk,hyperref}]{beamer}

The main error about the minor version is cured by

\usepackage[pdf15,x-1a]{pdfx}

More difficult is to fix the kvsetkeys error, which is due to bad programming in pdfx.sty. I copied the file and changed all occurrences of

\hypersetup{\pdfx@...}

(where ... is variable text) with

\expandafter\hypersetup\expandafter{\pdfx@...}

because \hypersetup doesn't expand its argument. There are nine replacements to do. Since this is not wrapped in a macro, but is code executed during loading of the package, there's no other way than fixing the package.

File a bug report, the code is wrong to begin with.

Disclaimer. Whether this makes a valid PDF/X file I don't know.

1
  • I have already sent a bug report to the authors of pdfx a few hours ago. I didn't find the option pdf15 (so wrote no answer), but stumbled also over the expansion problem.
    – gernot
    Nov 13, 2016 at 19:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .