# Help with xkeyval crashing pax/pdfpages

I'm preparing a document, and after trying to load some of my self-made style files, it started crashing. It is apparently the same problem as in [texhax] latest xkeyval breaks pdfpages and fancytooltips, which sadly seems to have no responses.

I could boil this down to the following minimal example (using TexLive 2010 on Ubuntu Linux):

\documentclass{article}

\usepackage{xkeyval} % comment to have compilation pass
\usepackage{pax}
\usepackage{pdfpages}

\begin{document}

Test

\end{document}


When \usepackage{xkeyval} is uncommented, then pdflatex fails with:

! Package xkeyval Error: scale' undefined in families PAX@Gin'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
...

l.11 ...ument,mypdf-doc}]{mypdf-doc.pdf}


If xkeyval is not loaded, then compilation passes fine.

Does anyone have an idea how I could "cheat" pdflatex, so xkeyval and pdfpages can coexist? xkeyval.pdf says:

2) ‘name’ undefined in families ‘fams’ (error)

The key name is not defined in the families in fams. Probably you mistyped name.

... but my problem is, I have no idea which of the style files I included through my homemade style files actually includes xkeyval - so I was hoping maybe there was a way to cheat xkeyval - maybe by somehow "defining" scale for the family PAX@Gin ?! If anyone knows if and how would this be possible, it would be great to hear an answer :)

EDIT: Here: CTAN package update: xkeyval it is also claimed a fix has been released for this; apparently, I'm not having it ?! The file in my TexLive distribution says:

\ProvidesPackage{xkeyval}
[2008/08/13 v2.6a package option processing (HA)]

-
TeXLive is frozen: You'll need to wait until tl2011 gets released or download the latest version of xkeyval from CTAN directly –  Seamus Jun 9 '11 at 18:46
Hi @Seamus - thanks for the comment! However, if by latest version from CTAN you mean this link: xkeyval.sty - that is the exact same version present on my installation (as noted above, 2008/08/13 v2.6a). Did you maybe have a different link in mind? Or are there other relevant files? Thanks - cheers! –  sdaau Jun 9 '11 at 18:49
The 2008 version, v 2.6a, is exactly what is in CTAN (just downloaded and diffed). –  David Hammen Jun 9 '11 at 18:50
Thanks for confirming, @David Hammen - if I can find an updated version of xkeyval elsewhere, I certainly wouldn't mind trying to install it manually :) Cheers! –  sdaau Jun 9 '11 at 18:52

it seems the trick to avoid 'scale' undefined in families 'PAX@Gin' is to add:

\makeatletter
\define@key{PAX@Gin}{scale}{}
\makeatother


... so now the entire minimal file that passes compilation is:

\documentclass{article}

\usepackage{xkeyval}
\usepackage{pax}
\usepackage{pdfpages}

% \presetkeys[PAX@Gin]{scale}{num=}{} % no work

% this work:
\makeatletter
\define@key{PAX@Gin}{scale}{}
\makeatother

\begin{document}

Test


Well obviously the problem is not a clash between xkeyval and pdfpages but a clash between xkeyval and pax. pax resets the internal prefix of \includegraphics keys in a way that doesn't work with xkeyval. It could work if you give the missing scale key an empty definition. But better notify the author (Heiko Oberdiek) so that he can solve the problem. –  Ulrike Fischer Jun 10 '11 at 7:36