# No hanging indent with biblatex in bibliography

I try to get rid of the hanging indent in my bibliography. The biblatex manual suggests \setlength{\bibhang}{0pt}, but it does not work in this case.

MWE:

\documentclass{article}

% arara: pdflatex
% arara: biber
% arara: pdflatex

\usepackage[
backend=biber,
style=chem-angew,
articletitle=true,
defernumbers=true
]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{D04,
author = {Duthor, D.},
year = {2004},
volume = {1},
pages = {2},
title = {Nanoscale magnetic skyrmions in metallic films and multilayers: a new twist for spintronics Nanoscale magnetic skyrmions in metallic films and multilayers: a new twist for spintronics},
}

\end{filecontents}

\setlength{\bibhang}{0pt}

\begin{document}

Some text \cite{D04}.

\printbibliography

\end{document}


How do I avoid the indentation for the second (and third) line of the reference?

The bibliography environment for numeric and alphabetic styles does not use \bibhang, because they work more like an enumerate. In those lists, all lines have the same indentation, but additionally there is a label on the first line.

So you if you want to use \bibhang you need something like this

\documentclass{article}
\usepackage[
backend=biber,
style=chem-angew,
articletitle=true,
defernumbers=true
]{biblatex}

\setlength{\bibhang}{0pt}
\defbibenvironment{bibliography}
{\list
{}
{\setlength{\leftmargin}{\bibhang}%
\setlength{\itemindent}{-\leftmargin}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}}
{\endlist}
{\item
\printtext[labelnumberwidth]{%
\printfield{labelprefix}%
\printfield{labelnumber}}%

\begin{document}
Some text \cite{sigfridsson,cicero,worman}.

\printbibliography
\end{document}


A simpler solution is

\defbibenvironment{bibliography}
{\trivlist}
{\endtrivlist}
{\item
\printtext[labelnumberwidth]{%
\printfield{labelprefix}%
\printfield{labelnumber}}%

• Yes. Could you tell me, why 'bibhang' does not work?
– Andy
Nov 10 '17 at 14:00
• @Andy The definition of \defbibenvironment{bibliography} does not include \bibhang for the numeric styles. That is because the numeric styles work more like an enumerate list, where the indentation is automatically determined by the label number. We had to change the entire bibliography environment to get things to work here. Nov 10 '17 at 14:06

A solution consists in redefining the bibenvironment:

\documentclass{article}
\usepackage[showframe]{geometry}
% arara: pdflatex
% arara: biber
% arara: pdflatex

\usepackage[
backend=biber,
style=chem-angew,
articletitle=true,
defernumbers=true
]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{D04,
author = {Duthor, D.},
year = {2004},
volume = {1},
pages = {2},
title = {Nanoscale magnetic skyrmions in metallic films and multilayers: a new twist for spintronics Nanoscale magnetic skyrmions in metallic films and multilayers: a new twist for spintronics},
}

\end{filecontents}

\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{%
\printfield{labelprefix}%
\printfield{labelnumber}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{0pt}%{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss\hspace{\dimexpr\labelnumberwidth+\labelsep}##1}}
{\endlist}
{\item}

\begin{document}

Some text \cite{D04}.

\printbibliography

\end{document}