8

Here's my MWE:

    \documentclass[oneside,11pt]{book}

    \usepackage[sort&compress]{natbib}      % for bibliography

    \begin{document}

    \chapter{one}

    here is some stuff and I'm going to reference \cite{Aliyu1985}.

    \bibliographystyle{plain}
    \bibliography{references}

    \end{document}

The references.bib file only contains one reference:

    @inproceedings{Aliyu1985,
    title="{{``Effects of Strain Rate on Delamination Fracture Toughness of Graphite/Epoxy"}}",
    author="Aliyu, A.A. and Daniel, I.M.",
    booktitle="Delamination and Debonding of Materials",
    year="1985",
    pages="336-348",
    organization="American Society for Testing and Materials",
    address="Philadelphia",
    publisher="ASTM STP 876",
    editor="W.S. Johnson, Ed.",
    }

My problem is that the document I am trying to format is my thesis and must conform to my university's format guidelines. The hanging indentation that is supposed to appear in the bibliography (set by \bibhang) is non existent. I've tried setting the length, i.e.

    \setlength{\bibhang}{2em}

or

    \setlength{\bibhang}{0.5in}

to no avail. My document is over 200 pages long, so I would really rather not change the document class or switch to biblatex (not even sure if that would work).

Does anyone have any suggestions on how to implement the hanging indentation?

4

\bibhang only works for author-year styles, and you are using a numeric style (plain) which uses a different set of parameters. You can redefine \NAT@bibsetnum (which gives the values used in numeric style), to use a desired hanging indentation controlled by \bibindent:

\documentclass[oneside,11pt]{book}
\usepackage[sort&compress]{natbib}      % for bibliography

\setlength\bibindent{2em}

\makeatletter
\renewcommand\NAT@bibsetnum[1]{\settowidth\labelwidth{\@biblabel{#1}}%
   \setlength{\leftmargin}{\bibindent}\addtolength{\leftmargin}{\dimexpr\labelwidth+\labelsep\relax}%
   \setlength{\itemindent}{-\bibindent}%
   \setlength{\listparindent}{\itemindent}
\setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}%
   \ifNAT@openbib
     \addtolength{\leftmargin}{\bibindent}%
     \setlength{\itemindent}{-\bibindent}%
     \setlength{\listparindent}{\itemindent}%
     \setlength{\parsep}{0pt}%
   \fi
}
\makeatother

\begin{document}

\chapter{Test Chapter}

here is some stuff and I'm going to reference \cite{Aliyu1985}.

\bibliographystyle{plain}
\bibliography{references}

\end{document}

This, together with your sample .bib file, produces:

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.