# Hyperref capitalizes the URL [closed]

I was trying to embed a link (which contains both upper-case and lower-case letters) on a text. Here is the code snippet:

\documentclass{article}

\usepackage[hidelinks]{hyperref}

\begin{document}

\href{http://goo.gl/maps/vcZfr}{Publications}

%% The above embedding could not redirect me to the correct link.
%% Instead it led me to https://goo.gl/MAPS/VCZFR
\end{document}


Could you help me out with why some letters got capitalized?

## closed as off-topic by Werner, Svend Tveskæg, user13907, Tom Bombadil, KurtOct 24 '15 at 18:58

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• I have no problem finding Gloria Jean's Coffees... – Werner Oct 24 '15 at 17:58
• I'm voting to close this question as off-topic because the minimal example doesn't reflect the suggested output. Based on the OP's comment, the \href was placed inside a sectional unit which reformatted the link. – Werner Oct 24 '15 at 18:15

## 1 Answer

hyperref does not do anything like this. The MWE of the question gives the following in the PDF file (pdflatex):

/Subtype/Link/A<</Type/Action/S/URI/URI(http://goo.gl/maps/vcZfr)>>


The URL is unchanged. Maybe the \href is inside an argument, which is uppercased later (e.g. via \MakeUppercase).

A workaround is a protected macro, which is not affected by \MakeUppercase or \uppercase:

\documentclass{article}

\usepackage[hidelinks]{hyperref}

\protected\def\hrefvcZfr{\href{http://goo.gl/maps/vcZfr}}

\begin{document}

\href{http://goo.gl/maps/vcZfr}{Publications}
\MakeUppercase{\hrefvcZfr{Publications}}

\end{document}

• Yes I just found it. I was just going to delete the question. The thing was the class file I was using capitalizes the header of the section. Publication was the section header. And I wanted to embed a link onto that. Anyways thanks. – Emroz Khan Oct 24 '15 at 18:05