1

I'm trying to have arbitrary line breaks in text created by Hyperref's \href macro. Actually, I found a solution for the \url macro here, but I don't know how to extend it to \href.

A bit of context. I'm preparing a bibliography and I'm trying to get advantage of DOI. My intent is to display DOIs as “doi:10.000/xxxx.yyyyy.zzzzzz”, where the boldface text is linked to http://doi.org/10.000/xxxx.yyyyy.zzzzzz, and it is typeset by using

doi:\href{http://doi.org/10.000/xxxx.yyyyy.zzzzzz}{10.000/xxxx.yyyyy.zzzzzz}

I would like that the displayed text (i.e., the DOI code) is allowed to be broken at any place or at least, at dots---hyphens work here as line-breaking points as usual.

I found half a dozen related questions, some of them involving sloppypar, but that would not be the best solution (since the rest of the document is justified). Thanks in advance.

0 Answers0