[Tex/LaTex] Special character in \url

charactersurls

I am stuck with a problem of a url to some website I try to put a link to.

The URL is: http://pl.wikipedia.org/wiki/Prawo_Lewisa-Mogridge’a
and Latex have an issue with the ’ symbol.
I put it the very easy way:

\url{http://pl.wikipedia.org/wiki/Prawo_Lewisa-Mogridge’a}

but the result is quite different:

http://pl.wikipedia.org/wiki/Prawo_Lewisa-Mogridge%5CT1%5Ctextquoteright_a

I obviously use UTF8 but the URL is Polish. Any idea what could be done? Thanks!

Best Answer

Go to wikipedia and copy its URL as such; then add \ before each %:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\url{http://www.wikiwand.com/pl/Prawo_Lewisa-Mogridge\%E2\%80\%99a}
\end{document}

EDIT 1

Instead of \url, you can use \href, in case you want the hyperlink:

\documentclass{report}
\usepackage{hyperref}
\begin{document}
    \href{http://www.wikiwand.com/pl/Prawo_Lewisa-Mogridge\%E2\%80\%99a}
    {http://wikiwand.com/pl/Prawo\_Lewisa-Mogridge\textquoteright{}a}
\end{document}

URL with textquoteright

EDIT 2

On the other hand, according to Wikipedia, this is the right way to cite:

//pl.wikipedia.org/w/index.php?title=Prawo_Lewisa-Mogridge%E2%80%99a&oldid=39769503

Check the link

Related Question