1

I'm trying to create xmp metadata using hyperxmp package. After having read the documentation I add in my preample this:

\usepackage{hyperxmp}
\usepackage{hyperref}
\hypersetup{% Configurazione del pacchetto hyperref
    pdfpagemode={UseOutlines},
    bookmarksopen,
    pdfstartview={FitH},
    pdftitle={},
    pdfauthor={},%
    pdfauthortitle={},%
    pdfsubject={Tesi di laurea},
    pdfkeywords={},
    pdfcopyright={},
    pdflicenseurl={http://creativecommons.org/licenses/by-nc-nd/2.5/it/},
    pdfcaptionwriter={},
    pdfcontactaddress={},
    pdfcontactcity=Lentini (SR)},
    pdfcontactpostcode={},
    pdfcontactcountry={,
    pdfcontactphone={},
    pdfcontactemail={},
    pdfcontacturl={},
    pdflang={it},
    colorlinks=true,
    breaklinks,
    linkcolor={blue},
    citecolor={red},
    urlcolor={blue}
}

The field obviously are blank because there are personal information. Anyway when I compile I got this error:

Package kvsetkeys Error: Undefined key `pdfcontactaddress' }
Package kvsetkeys Error: Undefined key `pdfcontactcity' }
Package kvsetkeys Error: Undefined key `pdfcontactpostcode' }
Package kvsetkeys Error: Undefined key `pdfcontactcountry' }
Package kvsetkeys Error: Undefined key `pdfcontactphone' }
Package kvsetkeys Error: Undefined key `pdfcontactemail' }
Package kvsetkeys Error: Undefined key `pdfcontacturl' }
7
  • What makes you think that those keys should be defined by the package?
    – egreg
    Jan 12, 2013 at 12:08
  • Documentation says: mirrors.ibiblio.org/CTAN/macros/latex/contrib/hyperxmp/…
    – Mazzy
    Jan 12, 2013 at 12:12
  • You probably don't have the last version of hyperxmp; I have hyperxmp 2012/12/13 v2.2 in the log file. After editing your example in order to remove a couple of syntax errors, it works.
    – egreg
    Jan 12, 2013 at 12:19
  • This is the version I have: hyperxmp 2012/09/16 v2.1
    – Mazzy
    Jan 12, 2013 at 12:22
  • 2
    Those keys have been added in version 2.2
    – egreg
    Jan 12, 2013 at 12:25

1 Answer 1

4

You have missed { at:

pdfcontactcity=Lentini (SR)},

and } at:

pdfcontactcountry={,

Once corrected, the following code compiles fine:

\documentclass{article}
\usepackage{lipsum}
\usepackage{hyperxmp}
\usepackage{hyperref}
\hypersetup{% Configurazione del pacchetto hyperref
    pdfpagemode={UseOutlines},
    bookmarksopen,
    pdfstartview={FitH},
    pdftitle={},
    pdfauthor={},%
    pdfauthortitle={},%
    pdfsubject={Tesi di laurea},
    pdfkeywords={},
    pdfcopyright={},
    pdflicenseurl={http://creativecommons.org/licenses/by-nc-nd/2.5/it/},
    pdfcaptionwriter={},
    pdfcontactaddress={},
    pdfcontactcity={Lentini (SR)},
    pdfcontactpostcode={},
    pdfcontactcountry={},
    pdfcontactphone={},
    pdfcontactemail={},
    pdfcontacturl={},
    pdflang={it},
    colorlinks=true,
    breaklinks,
    linkcolor={blue},
    citecolor={red},
    urlcolor={blue}
}

\begin{document}
  \lipsum
\end{document}

enter image description here

enter image description here

If you add \listfiles just before \begin{document}, tex will provide a list of files used with versions. This is what I get (miktex 2.9):

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
  lipsum.sty    2011/04/14 v1.2 150 paragraphs of Lorem Ipsum dummy text
hyperxmp.sty    2012/12/13 v2.2 Store hyperref metadata in XMP format
atenddvi.sty    2007/04/17 v1.1 At end DVI hook (HO)
zref-abspage.sty    2012/04/04 v2.24 Module abspage for zref (HO)
zref-base.sty    2012/04/04 v2.24 Module base for zref (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
 auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)
atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)
zref-lastpage.sty    2012/04/04 v2.24 Module lastpage for zref (HO)
atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
stringenc.sty    2011/12/02 v1.10 Convert strings between diff. encodings (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty    2012/04/25 v1.12 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2012/04/25 v1.12 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2012/04/25 v1.12 Construct package bundles (HO)
  ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)
  bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
 hopatch.sty    2011/06/24 v1.1 Wrapper for package hooks (HO)
xcolor-patch.sty    2011/01/30 xcolor patch
refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)
 hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
  pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
 hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX
rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
se-pdfdoc.def    2011/12/02 v1.10 stringenc: PDFDocEncoding
 se-utf8.def    2011/12/02 v1.10 stringenc: UTF-8
   color.sty    2005/11/14 v1.0j Standard LaTeX Color (DPC)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
supp-pdf.mkii
 nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)

Please check to see whether you also get the same. Else you may have to update your tex distribution.

5
  • I adjust but it still doesn't work
    – Mazzy
    Jan 12, 2013 at 12:11
  • @Mazzy: Is it not compiling or some thing else? Add \listfiles before \begin{document} and see if you are using the latest packages.
    – user11232
    Jan 12, 2013 at 12:13
  • I don't understand how you can compile it successfully. I run you code with my information and I got the same errors
    – Mazzy
    Jan 12, 2013 at 12:15
  • I runned the example in the documentation and it doesn't work.
    – Mazzy
    Jan 12, 2013 at 12:17
  • 2
    @Mazzy My version hyperxmp.sty 2012/12/13 v2.2 Store hyperref metadata in XMP format. Please try updating and check.
    – user11232
    Jan 12, 2013 at 12:30

You must log in to answer this question.

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