8

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!

9

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

  • 1
    No need of adding \ when you use \url from url package (which is loaded by hyperref). – user11232 Jan 23 '15 at 3:11
  • Oh well... the link is working, but it is displayed like this: pl.wikipedia.org/wiki/Prawo_Lewisa-Mogridge%E2%80%99a – Atais Jan 23 '15 at 3:11
  • I use report if it matters. – Atais Jan 23 '15 at 3:13
  • @Atais. This is the right way to type it, because not every font may have the character – Ludenticus Jan 23 '15 at 3:17
  • @HarishKumar. According to the url manual (p.1), «the \url argument cannot contain any “%”, “#”, or “^^”, or end with “\”.» – Ludenticus Jan 23 '15 at 3:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.