0

How do you remove the left indentation in the bibliography environment, so that the section heading 'Articles' and the bibliography items are aligned with all other sections and paragraphs in the document?

\documentclass{book}
\makeatletter
\def\@bibitem#1{\item[]%
    \if@filesw\immediate\write\@auxout{\string \bibcite {#1}{\the\value{\@listctr }}}\fi\ignorespaces}
\makeatletter

\begin{document}
\chapter{Chapter 1}
\section{Hello world}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nec tincidunt diam, eu porta nibh.
\begin{thebibliography}{99}
\section*{Articles}
    \bibitem{} Kahneman, Daniel, Jack Knetsch, and Richard Thaler, `Anomalies: The endowment effect, loss aversion, and status quo bias’ (1991) 5(1) \textit{Journal of Economic Perspectives} 193.
\end{thebibliography}
\end{document}

enter image description here

3
  • Maybe \usepackage{etoolbox} \patchcmd{\thebibliography}{\leftmargin\labelwidth}{\leftmargin0pt}{}{} ?
    – Ivan
    May 26, 2021 at 13:10
  • To be added \patchcmd{\thebibliography}{\labelsep}{0pt}{}{}
    – Ivan
    May 26, 2021 at 13:15
  • Thanks Ivan. I don't understand how to implement this solution. Could you please provide an example?
    – Craig
    May 27, 2021 at 7:54

1 Answer 1

1

Note that there are some limitations in this approach. \section* should not be put inside thebibliography, which is not meant for subdivided bibliographies. For example, if you want to add an indentation, with

\patchcmd{\thebibliography}{\leftmargin\labelwidth}{\leftmargin1cm\itemindent-1cm}{}{}

the section title will also be indented, and further adjustments would be needed. I invite you to consider the possibility of using compose the bibliography with biblatex. Anyway this is the MWE for your question:

\documentclass{book}
\usepackage{etoolbox}  
\makeatletter
  \patchcmd{\thebibliography}{\leftmargin\labelwidth}{\leftmargin0pt}{}{}
  \patchcmd{\thebibliography}{\labelsep}{0pt}{}{}
  \patchcmd{\@bibitem}{\item}{\item[]}{}{}
\makeatletter

\begin{document}
\chapter{Chapter 1}
\section{Hello world}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nec tincidunt diam, eu porta nibh.
\begin{thebibliography}{99}
\section*{Articles}
    \bibitem{} Kahneman, Daniel, Jack Knetsch, and Richard Thaler, `Anomalies: The endowment effect, loss aversion, and status quo bias’ (1991) 5(1) \textit{Journal of Economic Perspectives} 193.
\end{thebibliography}
\end{document}

enter image description here

You must log in to answer this question.

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