Unlike most people, I'm trying to prevent breaking the URL in my bibliography. In the case below, the URL in the first item should stay the way it is, since it is not broken across the lines. The URL in the second item is too long to fit on the line that it starts on, and so it is broken across two lines. In that case, the URL should be on the last line on its own. In short, I just want to prevent line breaks in URLs. The bibliography entries should otherwise be justified as they normally are.

\usepackage[paper = a4paper, vmargin = 1in]{geometry}
    AUTHOR = "Gustav Indreb\o",
    TITLE = "Norsk m\aa lsoga",
    YEAR = "1951",
    LOCATION = "Bergen",
    PUBLISHER = "John Grieg",
    URL = "http://urn.nb.no/URN:NBN:no-nb_digibok_2010110808058"}
    AUTHOR = "Andreas Droslum Haraldsrud",
    TITLE = "Dansk og norsk danna talem\aa l -- ei spr\aa khistorisk jamf\o ring",
    JOURNALTITLE = "Spr\aa klig Samling \AA rbok",
    YEAR = "2015",
    PAGES = "52--89",
    VOLUME = "2014",
    URL = "http://samnorsk.no/medlemsbladet/"}
\usepackage[style = authoryear-comp]{biblatex}

enter image description here


Please have a look to the following code. Please see that I used some code from this question, see acepted answer .


  AUTHOR    = {Gustav Indreb\o},
  TITLE     = {Norsk m\aa lsoga},
  YEAR      = {1951},
  LOCATION  = {Bergen},
  PUBLISHER = {John Grieg},
  URL       = {http://urn.nb.no/URN:NBN:no-nb_digibok_2010110808058},

  paper = a4paper, vmargin = 1in,

  style = authoryear-comp,

% Following code you find in 
% https://tex.stackexchange.com/questions/29802/biblatex-and-new-line-for-doi-url-and-eprint

  \usebibmacro{bbx:parunit}% Added

  \usebibmacro{bbx:parunit}% Added

  \usebibmacro{bbx:parunit}% Added





and the result:

enter image description here

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.