Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I encountered the following problem while preparing my CV. There are a few links prepared by hyperref that are not broken in several lines. I am wondering if there is a way to fix this problem. This is a minimal working example:

\documentclass{article}

\usepackage[utf8]{inputenc}

\usepackage[left=1.8in,right=1.8in,top=0.6in,bottom=0.6in]{geometry}

\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

\usepackage{hyperref}

\definecolor{linkcolour}{rgb}{0,0.2,0.6} 
\hypersetup{colorlinks=true,
breaklinks=true,
urlcolor=linkcolour,linkcolor=linkcolour,
citecolor=NavyBlue}

\begin{document}

\begin{itemize}

\item A.~M.~Aragón, S.~Soghrati, and P.~H.~Geubelle. In-plane deformation effect on the cohesive failure of heterogeneous adhesives: a multi-scale analysis based on a 3D generalized finite element scheme, \emph{Journal of the Mechanics and Physics of Solids}, Published online; doi: \href{http://dx.doi.org/10.1016/j.jmps.2013.03.003}{http://dx.doi.org/10.1016/j.jmps.2013.03.003}

\item A.~M.~Aragón, S.~Soghrati, and P.~H.~Geubelle. In-plane deformation effect on the cohesive failure of heterogeneous adhesives: a multi-scale analysis based on a 3D generalized finite element scheme, \emph{Journal of the Mechanics and Physics of Solids}, Published online; doi: \url{http://dx.doi.org/10.1016/j.jmps.2013.03.003}

\end{itemize}

\end{document}

The result of this code is as follows:

enter image description here

Also, is there a way to use bibtex entries in the middle of a document as they show up in the end of an article? I need to put a list of publications and the only way I managed to do this is just writing regular text to mimic the bibtex entries.

share|improve this question
    
For in-text bibtex entries, you should look at biblatex and its \fullcite commands. It should also provide a workaround to the previous problem, since you can use the \url field in the .bib entry. –  T. Verron May 1 '13 at 9:30
    
Hi Verron, thanks for your answer. I'm interested in making this fullcite environment to work. Do you have a nice reference for it? –  aaragon May 1 '13 at 13:18
    
The biblatex manual is by itself an excellent reference, although "too much for the job". For more specific tutorials, you can have a look at the questions tagged biblatex on this site, and in particular this one to get started: tex.stackexchange.com/questions/5091/… –  T. Verron May 1 '13 at 13:34
    
I'm trying to make the fullcite approach to work, and for some reason I can't. I just posted to get some help on this issue. –  aaragon May 1 '13 at 13:36

1 Answer 1

up vote 6 down vote accepted

The second argument of hyperref is treated (and hyphenated) like normal text - you would e.g. also get an error if you used an underscore. If you want that hyperref treats it as url use \nolinkurl:

\href{http://dx.doi.org/10.1016/j.jmps.2013.03.003}{\nolinkurl{http://dx.doi.org/10.1016/j.jmps.2013.03.003}}
share|improve this answer
1  
Also the text can be different: \href{http://dx.doi.org/10.1016/j.jmps.2013.03.003}{\nolinkurl{10.1016/j.jmps.2‌​013.03.003}} gets 10.1016/j.jmps.2013.03.003 in the text as DOI identifier, but it is linked with the full URL. –  Heiko Oberdiek May 1 '13 at 10:32
    
Thanks for posting your solution Ulrike. Even though it works, it does also change the font of the link and makes it as the send link in the figure above. Is there a way to avoid this? –  aaragon May 1 '13 at 13:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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