2

This question already has an answer here:

I'm creating a document that contains urls in the bibliography. That works just fine and the urls are broken to new lines at appropriate points.

The only issue I have is that the two pdf viewers I've tested seem to crop part of the url from the end.

Example:

http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/docs/reference.html

becomes

http://google-maps-utility-library-v3

which is exactly the part before the line break.

Here is an image showing the problem (the tooltip shows the problem):

enter image description here

This is the latex document:

\documentclass[11pt]{article} % type of the document
\usepackage[english]{babel} % language of all the auto generated text
\usepackage[utf8x]{inputenc} % encoding stuff
\usepackage[T1]{fontenc} % encoding stuff
\usepackage[hyphens]{url} % \url command
\usepackage{geometry} % define the geometry of the page
\usepackage{lmodern} % <-- THIS BREAKS IT
\geometry{a4paper,left=25mm,right=25mm, top=28mm, bottom=28mm} 

% the document starts here
\begin{document}

Google MarkerClusterer \cite{MarkerClusterer}.

% add the bubliography (without file extension) and style it
\bibliography{cite}
\bibliographystyle{unsrt}

\end{document}

and the bib file:

@misc{MarkerClusterer,
    author = {},
    title = {{MarkerClusterer for Google Maps v3}},
    howpublished = {\url{http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/docs/reference.html}},
    year = {2010},
    note = {Last accessed on 2013-09-19}
}

I compiled with both pdflatex and lualatex.

The problem seems to be related to the lmodern package, since it works without it.

Does anyone know how to make the url break lines AND still make it clickable (without parts being cropped)?

marked as duplicate by egreg, Mico, Andrew Swann, user31729, Jesse Jun 26 '14 at 13:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    The problem is not related to lmodern; you don't get links in the PDF unless you load hyperref. What you see is just a guess made by the PDF viewer based on the data it sees. – egreg Jun 26 '14 at 12:57
  • OK, so just including hyperref should fix it? – Baz Jun 26 '14 at 12:58
  • 2
    Yes, it will. I believe this question has already appeared, so I'm looking for a duplicate. – egreg Jun 26 '14 at 13:03
  • @egreg Thanks! I was looking for the wrong cause then. – Baz Jun 26 '14 at 13:13