EDIT: As Bill B. and Caramdir point out in their comments after Bill B. produced his results posted below, more information is needed in order to make a better call. To remedy, my output was produced using MiKTeX 2.8 pdflatex
with no special command line flags or switches. My pdf viewer is Adobe Acrobat Pro 9.0. The platform is Windows 7. All software including hyperref
is fully up to date against the latest rev levels and patches.
As I'm guessing that this is a pretty normal setup, at least in the Windows world, I'd be very interested (and grateful) in learning whether this problem affects other people or whether it's just some kind of rather weird one-off. My gut feel after seeing Bill B's results (and also after having traversed hyperref
's code) is that the culprit is Adobe Acrobat or possibly MiKTeX pdflatex
.
Can anyone corroborate? I'd be very grateful to know.
Original question:
I have a problem with hyperref
; it "enquotes" Author and Keywords (but not Title or Subject) metadata if the data sent to these contain a comma or semi-colon (but not, say, a full stop or a colon).
I've included some figures and code that show this below.
\documentclass{article}
\newcommand*\metadata{%
% uncomment all but one line below
% a b c% <-- no problem
a, b, c% <-- problem
% a; b; c% <-- problem
% a: b: c% <-- no problem
% a* b* c% <-- no problem
}
\usepackage[
pdftitle={\metadata}, % never enquoted
pdfauthor={\metadata}, % enquoted if , or ; is present
pdfsubject={\metadata}, % never enquoted
pdfkeywords={\metadata}, % enquoted if , or ; is present
]{hyperref}
\begin{document}
Press ctl-d (in Acrobat Reader) to see pdf file metadata.
\end{document}
Not only is this quite ugly but, more importantly, it interferes with metadata extracting programs used by certain document repositories.
I've worked my way through hyperref
's code without much success. Would anyone have a solution for this problem? Or advice about what I might be doing wrong?
\hypersetup
rather than as package options? – Seamus Dec 1 '10 at 11:57