# Bibliography and Jabref [duplicate]

I have some problems with the bibliography of my thesis and Jabref. I don't understand why some URL or DOI go out the borders... Can you help me?

\documentclass{article}
\usepackage[backend=bibtex,style=phys,biblabel=brackets,natbib=true,sorting=none,url=true,hyperref=auto]{biblatex}

\usepackage[autostyle=true]{csquotes}

\begin{document}

\setcounter{biburlnumpenalty}{8000}

\end{document}

• This has nothing to do with poor old JabRef… Simply, LaTeX, by default, cannot hyphenate url's anywhere. You have to customise the rules for hyphenating url's. Other possibility, asking for urls to start a new line. Jul 23 '17 at 14:23
• Thanks for the answer... How can I do that? And why some links cannot hyphenate and others do? Jul 23 '17 at 14:28
• Could you post a full compilable code+ the problematic bibliography items? Jul 23 '17 at 15:09
• Can you please add a minimal working example with bibliography (MWEB) so we can reproduce your problem? Jul 23 '17 at 15:09
• @Sebastiano Thanks for the code. Can you please complete it with the bib entries that don't work? Jul 23 '17 at 19:18

Because we have no bib entrys you use I simply used the example bib file biblatex-examples.bib. The bib entrys kastenholz,sigfridsson,ctan,markey have dois and urls included to test the code.

To get a better layout add the three following lines to your code:

\setcounter{biburlnumpenalty}{8000} % <=================================
\setcounter{biburlucpenalty}{8000}  % <=================================
\setcounter{biburllcpenalty}{8000}  % <=================================


You can change the number 8000 as you need (1 to 10000).

With the following MWE I have no problems with the margins and dois or urls:

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{Hsi_JACS_1975,
author = {Edward Hsi and Robert G. Bryant},
title = {Nuclear magnetic resonance relaxation in frozen lysozyme solutions},
journal = {J. Am. Chem. Soc.},
year = {1975},
volume = {97},
number = {11},
pages = {3220--3221},
doi = {10.1021/ja00844a051},
eprint = {dx.doi.org/10.1021/ja00844a051},
url = {dx.doi.org/10.1021/ja00844a051},
}
@Article{Brovchenko_ChemPhysChem_2008,
author = {Ivan Brovchenko and Alla Oleinikova},
title = {Multiple Phases of Liquid Water},
journal = {Chem\-PhysChem},
year = {2008},
volume = {9},
number = {18},
pages = {2660--2675},
issn = {1439-7641},
doi = {10.1002/cphc.200800639},
keywords = {percolation, phase diagrams, phase transitions,
supercritical fluids, thermodynamics},
publisher = {WILEY-VCH Verlag},
url = {dx.doi.org/10.1002/cphc.200800639},
}
\end{filecontents}

\documentclass{article}
\usepackage[%
backend=bibtex,
style=phys,
biblabel=brackets,
natbib=true,
sorting=none,
url=true,
hyperref=auto
]{biblatex}
\usepackage[autostyle=true]{csquotes}

\setcounter{biburlnumpenalty}{8000} % <=================================
\setcounter{biburlucpenalty}{8000}  % <=================================
\setcounter{biburllcpenalty}{8000}  % <=================================

\begin{document}

Test \cite{kastenholz,sigfridsson,ctan,markey}
test \cite{Hsi_JACS_1975,Brovchenko_ChemPhysChem_2008} test