0

I know there are a couple of questions regarding non-hyphenated bibliographies, but neither is exactly what I'm looking for.

I would like to (i) stop biblatex hyphenating bibliography entries; and (ii) keep the bibliography justified. Using the sloppy command hasn't helped at all, and I don't want to change the margins.

I know one's initial reaction might be that this will make it look ugly, but most academic books I've read have a justified bibliography without any hyphens and they look great! Is there a way to recreate this?

Here's a MWE:

\documentclass[12pt]{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{MacFarlane2004,
    author = {MacFarlane, John},
    file = {:Users/James/Documents/St Andrews/Philosophy/MPhil/MPhil Thesis/Readings/Normativity/MacFarlane In What Sense is Logic Normative.pdf:pdf},
    journal = {Unpublished Manuscript},
    title = {{In What Sense (If Any) Is Logic Normative for Thought?}},
    year = {2004}
}

@incollection{Kolodny2018,
    address = {Oxford},
    author = {Kolodny, Niko},
    booktitle = {The Oxford Handbook of Reasons and Normativity},
    chapter = {31},
    editor = {Star, Daniel},
    file = {:Users/James/Documents/St Andrews/Philosophy/MPhil/MPhil Thesis/Readings/Normativity/Instrumental Reasons Kolodny.pdf:pdf},
    pages = {731--763},
    publisher = {Oxford University Press},
    title = {{Instrumental Reasons}},
    year = {2018}
}

@article{Cook2010,
    author = {Cook, Roy T.},
    doi = {10.1111/j.1747-9991.2010.00286.x},
    file = {:Users/James/Library/Application Support/Mendeley Desktop/Downloaded/Cook - 2010 - Let a Thousand Flowers Bloom A Tour of Logical Pluralism.pdf:pdf},
    journal = {Philosophy Compass},
    month = {jun},
    number = {6},
    pages = {492--504},
    publisher = {John Wiley {\&} Sons, Ltd (10.1111)},
    title = {{Let a Thousand Flowers Bloom: A Tour of Logical Pluralism}},
    url = {http://doi.wiley.com/10.1111/j.1747-9991.2010.00286.x},
    volume = {5},
    year = {2010}
}

\end{filecontents}

\usepackage[style=apa, natbib=true, doi=false, url=false]{biblatex}
\addbibresource{/Users/James/Documents/MWEs/Bibliography Hyphenation.bib}
\AtEveryBibitem{\clearfield{number}} %gets rid of issue numbers
\AtEveryBibitem{\clearfield{chapter}} %gets rid of chapters
\DeclareFieldFormat{apacase}{#1} %stops capitalisation
\DeclareFieldFormat[article]{volume}{\apanum{#1}} %deitalicises volume numbers
\setlength\bibitemsep{1.5\itemsep} %separates entries

\usepackage[margin=30mm]{geometry} %changes margins


\usepackage{baskervillef} %font
\usepackage[T1]{fontenc} %font

\title{Justified Bibliographies Without Hyphenation}
\date{\vspace{-10mm}}


\begin{document}

\maketitle

\noindent I might want to cite \citet{MacFarlane2004}, \citet{Kolodny2018}, and \citet{Cook2010}. But I would like the bibliography to remain justified, but without the hyphenation. Thanks for the help!

\printbibliography


\end{document}

And this is what it outputs:

enter image description here

1
  • 2
    Before \printbibliography, add \hyphenpenalty=10000 \exhyphenpenalty=10000. But remember that the spacing will be affected, and not always for the better. The examples you show don't include url's; if those are present, the results are usually much worse. Feb 6, 2020 at 17:42

1 Answer 1

2

In theory you can use the methods of the hyphenat package (which apparently goes back to the TeXbook - and is also mentioned by barbara beeton in the comments as I just realised) to suppress hyphenation by adding \hyphenpenalty=10000\exhyphenpenalty=10000\relax to the definition of \bibsetup.

\renewcommand*{\bibsetup}{%
  \interlinepenalty=5000\relax
  \widowpenalty=10000\relax
  \clubpenalty=10000\relax
  \hyphenpenalty=10000\exhyphenpenalty=10000\relax
  \raggedbottom
  \frenchspacing
  \biburlsetup}

But I doubt you will be particularly happy with the results. The thing is that your two wishes are pretty much incompatible.

If you want justification, you need to make it possible to move bits of text from one line to another. If you disallow hyphenation, the chunks of text you can move are potentially very large. If only very large chunks of text can be moved around, it is much less likely that TeX can find a configuration that looks good: Most likely you will end up with overfull boxes unless you opt for large emergency stretch values (as in the following example).

\documentclass[12pt]{article}
\usepackage[margin=30mm]{geometry}

\usepackage{baskervillef}
\usepackage[T1]{fontenc}

\usepackage[style=apa, doi=false, url=false]{biblatex}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldset=number, null]
      \step[fieldset=chapter, null]
    }
  }
}

\DeclareFieldFormat{apacase}{#1}
\DeclareFieldFormat[article]{volume}{\apanum{#1}}
\setlength\bibitemsep{1.5\itemsep}

\renewcommand*{\bibsetup}{%
  \interlinepenalty=5000\relax
  \widowpenalty=10000\relax
  \clubpenalty=10000\relax
  % no hyphenation in the bibliography
  \hyphenpenalty=10000\exhyphenpenalty=10000\relax
  % increase allowed stretch to avoid overfull boxes
  \setlength{\emergencystretch}{1em}%
  \raggedbottom
  \frenchspacing
  \biburlsetup}


\begin{filecontents}[force]{\jobname.bib}
@article{MacFarlane2004,
  author  = {MacFarlane, John},
  journal = {Unpublished Manuscript},
  title   = {{In What Sense (If Any) Is Logic Normative for Thought?}},
  year    = {2004},
}
@incollection{Kolodny2018,
  address   = {Oxford},
  author    = {Kolodny, Niko},
  booktitle = {The Oxford Handbook of Reasons and Normativity},
  chapter   = {31},
  editor    = {Star, Daniel},
  pages     = {731--763},
  publisher = {Oxford University Press},
  title     = {{Instrumental Reasons}},
  year      = {2018},
}
@article{Cook2010,
  author    = {Cook, Roy T.},
  doi       = {10.1111/j.1747-9991.2010.00286.x},
  journal   = {Philosophy Compass},
  month     = jun,
  number    = {6},
  pages     = {492--504},
  publisher = {John Wiley {\&} Sons, Ltd (10.1111)},
  title     = {{Let a Thousand Flowers Bloom: A Tour of Logical Pluralism}},
  url       = {http://doi.wiley.com/10.1111/j.1747-9991.2010.00286.x},
  volume    = {5},
  year      = {2010}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
I might want to cite \textcite{MacFarlane2004,Kolodny2018,Cook2010}.
But I would like the bibliography to remain justified, but without the hyphenation.

\printbibliography
\end{document}

Justified bibliography without line breaks

You may want to have a look at How to adjust the breaking in the bibliography? to explore some other options to influence the spacing in your bibliography.

Even though I'm a big fan of justified text in general, justification is one of the first things I would give up in the bibliography if things otherwise don't work out. Entries are bound to look a bit ragged anyway since they are short and the last line will not extend to the margin that often anyway.

1
  • For what it's worth -- and this is perhaps because in philosophy you don't need to include DOIs and URLs in your bibliography -- I'm really pleased with this solution, it gives me exactly the result I was hoping for! Thanks so much! Feb 7, 2020 at 15:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .