This question already has an answer here:

There were some hits for my problem but did not answer fully.

I found out the PassOptions... command to get rid of some options clash with url and hyperref packages here

Forcing linebreaks in \url does not work with biblatex and menukeys

I have the below MWE with two options where I am using biblatex.

One is with hyperref and the other without. The one without hyperref works fine and the url information is broken correctly but the one with hyperref does not work. It leaves the link as a one long line with the box. I could not really find a fix for this. What is missing from the implementation with hyperref?

% % option 1
% %
% % that works without hyperref
% % and the links I used as in the rest of my thesis
% % the long line is broken correctly without using
% % hyphens option with the url package
% \usepackage[backend=bibtex,backref,style=numeric,
%             sorting=nyt,firstinits=true,maxbibnames=99]{biblatex}
% \addbibresource{test.bib}
% \usepackage{xcolor}
% % the test
% \title{Test document}
% \begin{document}
% this\cite{nvh_BK} is a test.
% \printbibliography
% % end of option 1

% option 2
% with hyperref package
% I found out that I have to use the 
% PassOptionsToPackage before the biblatex definitions
   colorlinks   = true,    % Colours links instead of ugly boxes
   urlcolor     = blue,    % Colour for external hyperlinks
   linkcolor    = blue,    % Colour of internal links
   citecolor    = red,     % Colour of citations
   pdfborder = { 0 0 1 },  % Border for pdf
   linkbordercolor = blue, % Border color
   citebordercolor = red,
   breaklinks = true
% test
\title{Test document}
this\cite{nvh_BK} is a test.
% end of option 2

test bib file I used with one entry is as follows:

  author = {Bruel\&Kjaer},
  title = {Vehicle noise vibration and harshness development},
  year = 2019,
  url = {https://www.bksv.com/en/Applications/vehicle-noise-vibration-and-harshness-development-test-test-test},
  urldate = {2019-05-10}

marked as duplicate by moewe biblatex Jul 29 at 6:28

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.

  • how are you compiling? with pdflatex? – Ulrike Fischer Jul 27 at 14:01
  • @UlrikeFischer, yes – Umut Tabak Jul 27 at 14:02
  • 1
    Try \usepackage{xurl} before biblatex – CarLaTeX Jul 27 at 14:03
  • @CarLaTeX, still the same although now the box around the url is not there but the line is not broken – Umut Tabak Jul 27 at 14:04
  • I'm probably missing something (I'm not quite sure about the two options hidden in one MWE), but when I compile the MWE without modification I get a nicely brokem URL. Can you show a screenshot of the output you get, please? – moewe Jul 27 at 14:05

Browse other questions tagged or ask your own question.