1

In my bibliography four items extend beyond the column width, three of them because of the DOI. I use biblatex.

My MWE looks like this

\documentclass[11pt,twoside]{report} 
\usepackage[url=false,isbn=false,giveninits=true,maxbibnames=999]{biblatex} 
\RequirePackage{filecontents}

\begin{filecontents}{bib.bib}
@inproceedings{hofmann_numerical_1999,
    address = {San Francisco, USA},
    series = {{FEDSM99}-6755},
    title = {Numerical and experimental investigations on the oscillating behavior of cloud cavitation: {Part} 1 visualisation},
    booktitle = {{ASME}{/}{JSME} {Joint} {Fluids} {Engineering} {Conference}},
    author = {Hofmann, Michael and Lohrberg, H and Ludwig, G and Stoffel, B and Reboud, JL and Fortes-Patella, R},
    year = {1999}
}
@article{kravtsova_high-speed_2014,
    title = {High-speed visualization and {PIV} measurements of flows of plates and {NACA0015} hydrofoil},
    volume = {110},
    issn = {03019322},
    url = {https://linkinghub.elsevier.com/retrieve/pii/S0301932213002164},
    doi = {10.10160/j.ijmultiphaseflow.2013.12.004},
    urldate = {2018-10-23},
    journal = {International Journal of Multiphase Flow},
    author = {Kravtsova, A.Yu. and Markovich, D.M. and Pervunin, K.S. and Timoshevskiy, M.V. and Hanjali{\'c}, K.},
    year = {2014},
    pages = {1190--1220}
}
@article{jasak_high_1999,
    title = {High resolution differencing scheme}, % for arbitrarily unstructured meshes},
    volume = {31},
    issn = {02712091, 10970363},
    doi = {10.10020/(SICI)1097-01363(19990930)31:2<431::AID-FLD884>3.0.CO;2-T},
    number = {110},
    urldate = {2018-10-24},
    journal = {International Journal for Numerical Methods in Fluids},
    author = {Jasak, H. and Weller, H.G. and Gosman, A.D.},
    year = {1999},
    pages = {1431--1449}
}
@article{vogel_optical_1989,
    title = {Optical and acoustic investigations of the bubbles near a solid cute boundary},
    number = {110},
    volume = {206},
    issn = {0022-1120, 1469-7645},
    doi = {10.1017/S0022112089002314},
    urldate = {2019-11-29},
    journal = {Journal of Fluid Mechanics},
    author = {Vogel, A. and Lauterborn, W. and Timm, R.},
    year = {1989},
    pages = {299--338}
}
\end{filecontents}

\addbibresource{bib.bib}

\begin{document}
\cite{kravtsova_high-speed_2014,hofmann_numerical_1999,vogel_optical_1989} and \cite{jasak_high_1999}.
\printbibliography[heading=bibintoc]

\end{document}

According to Achieve Linebreak in DOI I tried to change the penalty with the following, but without any effect:

\DeclareBibliographyCategory{badbreaks}
\addtocategory{badbreaks}{hofmann_numerical_1999,kravtsova_high-speed_2014,jasak_high_1999,vogel_optical_1989}

\AtEveryBibitem{%
  \ifcategory{badbreaks}
    {\defcounter{biburlnumpenalty}{100}}
    {}}

Thank you in advance.

Mar ume
  • 13
  • 3

1 Answers1

2

I have two suggestions:

  • Load the xurl package. This allows LaTeX to introduce line breaks not only in URL strings, but in doi strings as well.

  • In the entry hofmann_numerical_1999, change the field

    booktitle = {{ASME}{/}{JSME} {Joint} {Fluids} {Engineering} {Conference}},
    

    to

    booktitle = {ASME\slash JSME Joint Fluids Engineering Conference},
    

    This allows LaTeX to introduce a line break right after the / ("slash") symbol. Note: it is not necessary to encase the words ASME, JSME, Joint etc in curly braces.

  • Do not enter abbreviated middle initials as, say,

    Kravtsova, A.Yu. and Markovich, D.M.
    

    as doing so will make biblatex/biber (and BibTeX too, for that matter) think that there's a single first name -- and no middle initial. Do change the author information to

    Kravtsova, A. Yu. and Markovich, D. M.
    

    etc.

The following sample document implements these ideas. I've highlighted in yellow the line breaks which now no longer protrude into the margin.

enter image description here

\documentclass[11pt,twoside]{report} 
\usepackage[T1]{fontenc} % new
\usepackage[url=false,isbn=false,giveninits=true,
           maxbibnames=999]{biblatex} 
%\RequirePackage{filecontents} % not needed
\begin{filecontents}[overwrite]{bib.bib}
@inproceedings{hofmann_numerical_1999,
    address = {San Francisco, USA},
    series = {FEDSM99-6755},
    title = {Numerical and experimental investigations on the oscillating behavior of cloud cavitation: {Part}~1 visualisation},
    booktitle = {ASME\slash JSME Joint Fluids Engineering Conference},
    author = {Hofmann, Michael and Lohrberg, H. and Ludwig, G. and Stoffel, B. and Reboud, J.L. and Fortes-Patella, R.},
    year = {1999}
}
@article{kravtsova_high-speed_2014,
    title = {High-speed visualization and {PIV} measurements of flows of plates and {NACA0015} hydrofoil},
    volume = {110},
    issn = {03019322},
    url = {https://linkinghub.elsevier.com/retrieve/pii/S0301932213002164},
    doi = {10.10160/j.ijmultiphaseflow.2013.12.004},
    urldate = {2018-10-23},
    journal = {International Journal of Multiphase Flow},
    author = {Kravtsova, A. Yu. and Markovich, D. M. and Pervunin, K. S. and Timoshevskiy, M. V. and Hanjali{\'c}, K.},
    year = {2014},
    pages = {1190--1220}
}
@article{jasak_high_1999,
    title = {High resolution differencing scheme},
    volume = {31},
    issn = {02712091, 10970363},
    doi = {10.10020/(SICI)1097-01363(19990930)31:2<431::AID-FLD884>3.0.CO;2-T},
    number = {110},
    urldate = {2018-10-24},
    journal = {International Journal for Numerical Methods in Fluids},
    author = {Jasak, H. and Weller, H. G. and Gosman, A. D.},
    year = {1999},
    pages = {1431--1449}
}
@article{vogel_optical_1989,
    title = {Optical and acoustic investigations of the bubbles near a solid cute boundary},
    number = {110},
    volume = {206},
    issn = {0022-1120, 1469-7645},
    doi = {10.1017/S0022112089002314},
    urldate = {2019-11-29},
    journal = {Journal of Fluid Mechanics},
    author = {Vogel, A. and Lauterborn, W. and Timm, R.},
    year = {1989},
    pages = {299--338}
}
\end{filecontents}
\addbibresource{bib.bib}

\usepackage{xurl} % new

\begin{document}
\cite{kravtsova_high-speed_2014, hofmann_numerical_1999, vogel_optical_1989} and \cite{jasak_high_1999}.
\printbibliography[heading=bibintoc]
\end{document}
Mico
  • 506,678
  • 1
    Thank you very much. This worked perfectly for the doi entries. For the slash it works for this MWE also, but I still have to figure out how to make zotero export it as \slash, since zotero makes {\textbackslash}slash out of it. Thx also for the tip about initial names. – Mar ume Apr 19 '20 at 13:29
  • @Marume - Thanks for letting me know that my answer was helpful. About Zotero: If it's Zotero that created booktitle = {{ASME}{/}{JSME} {Joint} {Fluids} {Engineering} {Conference}},, that would be a prime example of why one shouldn't trust this tool too much. Quite apart from the issue of whether to replace / with \slash, I can simply not come up with a decent explanation of why Zotero would wrap every single word in curly braces. – Mico Apr 19 '20 at 14:11