Why are these links generated?
In this case, Adobe Reader is deducing that they are links.
(Ulrike Fischer) But this is viewer-dependent: the TeXworks viewer doesn't produce automatic links, but Preview does (and even without glyphtounicode.tex
's mechanics). (Joseph Wright)
How can I prevent these text strings from producing hyperlinks?
For Adobe Reader XI, one can enable or disable the following checkbox: Preferences
→ General
→ Basic Tools
→ Create links from URLs
.
Why is link creation dependent on the two commands \input{glyphtounicode}
and \pdfgentounicode=1
?
The reader is using the names of the glyphs to decide whether a sequence of glyphs is a link. Usage of the glyph names depends on these two crucial lines.
(adapted from Ulrike Fischer)
The most important parts from glyphtounicode.tex
seem to be the following lines:
\pdfglyphtounicode{a}{0061}
\pdfglyphtounicode{b}{0062}
...
\pdfglyphtounicode{z}{007A}
and
\pdfglyphtounicode{colon}{003A}
\pdfglyphtounicode{slash}{002F}
\pdfglyphtounicode{period}{002E}
Without colon
or slash
, the lower text will have only its second part appear as a link. Without period
, only the lower text is linked, but it is linked in its entirety.
The lower-case letters seem to have duplicates
\pdfglyphtounicode{Asmall}{0061}
\pdfglyphtounicode{Bsmall}{0062}
...
\pdfglyphtounicode{Zsmall}{007A}
that seem to not make a difference.
As for the capital letters:
\pdfglyphtounicode{A}{0041}
\pdfglyphtounicode{B}{0042}
...
\pdfglyphtounicode{Z}{005A}
With
WWW.GOOGLE.COM
HTTP://WWW.GOOGLE.COM/
the lower but not the upper text will be linked. Without capital letters, www.GOOGLE.COM
is still recognized. This indicates that the capital letters play a role, but there are some details to explore.
Thanks to Ulrike Fischer for significant contributions to the solution. Herbert deserves credit for an idea and Joseph Wright and egreg for data points.
\usepackage{hyperref}
, no links are created.xpdf
I see no link, so it's a previewer's feature.\usepackage[T1]{fontenc}
and\usepackage{lmodern}
"creates" links too.