This very simple working example does not work to include pdf and produces the error message "! Package keyval Error: page undefined.":







From log-file:

Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)

Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)

Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
Package graphics Info: Driver file: pdftex.def on input line 99.

./tmp.tex:9: Package keyval Error: page undefined.

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

l.9 \includepdf[pages=-]{./a.pdf}
  • Show your log-file. Is your system up-to-date? – Ulrike Fischer Aug 14 '17 at 13:33
  • I have done archlinux update for everything using sudo packman -Suy – Waleed A. Yousef Aug 14 '17 at 13:34
  • 1
    This doesn't mean that you have an up-to-date tex. So show the log-file. – Ulrike Fischer Aug 14 '17 at 13:37
  • 1
    This is not accessible. – Ulrike Fischer Aug 14 '17 at 13:42
  • 1
    local files wins over default files. Your system is quite up-to-date. – Ulrike Fischer Aug 14 '17 at 14:33

The log file does not match the example above (\includepdf[scale=0.7]{./a.pdf} in the example but \includepdf[pages=-]{./a.pdf} in the log-file)!

Nevertheless, the log-file shows, that you have a very outdated /home/wyousef/texmf/tex/latex/Bioinformatics/graphicx.sty from 1999, that is found before the graphicx.sty of the distribution, because it is in your TEXMFHOME tree which is usually searched before, e.g., the distribution tree TEXMFDIST or TEXMFMAIN, which is /usr/share/texmf-dist/ in your case.

You should remove at least this outdated file /home/wyousef/texmf/tex/latex/Bioinformatics/graphicx.sty so that TeX Live (namely kpsewhich) will find /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty. All other files seem to be up-to-date, so that I'd expect the distribution graphicx.sty also to be up-to-date.

Instead of removing only this old file, you could also suggest to rename /home/wyousef/texmf, e.g., into /home/wyousef/texmf.outdated. In this case kpsewhich and other TeX applications should not longer find files in this TEXMF-tree. If you later find, that you need files from there, you could copy only those files to the correct destination in a new /home/wyousef/texmf.

  • I had the same problem. Thanks for the solution. – rasha May 13 '19 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.