Is hyperref really the best way to add metadata to a TeX file?

You could use the \pdfinfo command of pdfTeX to add meta data. For example:

\pdfinfo{
  /Title (example.pdf)
  /Creator (TeX)
  /Producer (pdfTeX 1.40.0)
  /Author (Seamus)
  /Subject (Example)
  /Keywords (pdflatex, latex,pdftex,tex)}

There's no need to load a package for that purpose. This command is explained in the pdfTeX documentation.


There is xmpincl which allows you to add arbitrary metadata in the Adobe XMP (Extensible Metadata Platform) format. But you have to write a separate XML file to do this. I always thought there should be a LaTeX way to create an XMP file on the first pass and embed it in the PDF on the second pass. But so far I know of none.


hyperxmp – Embed XMP metadata within a LATEX document

http://www.ctan.org/pkg/hyperxmp

" ... The pack­age in­te­grates seam­lessly with hy­per­ref and re­quires vir­tu­ally no mod­i­fi­ca­tions to doc­u­ments that al­ready ex­ploit hy­per­ref's mech­a­nisms for spec­i­fy­ing PDF meta­data..

"XMP (eXten­si­ble Me­ta­data Plat­form) is a mech­a­nism pro­posed by Adobe for em­bed­ding doc­u­ment meta­data within the doc­u­ment it­self. The meta­data is de­signed to be easy to ex­tract, even by pro­grams that are obliv­i­ous to the doc­u­ment's file for­mat. Most of Adobe's ap­pli­ca­tions store XMP meta­data when sav­ing files. Now, with the hy­per­xmp pack­age, it is triv­ial for LaTeX doc­u­ment au­thors to store XMP meta­data in their doc­u­ments as well.