4

I prefer to build my bibliography manually because I'm finicky about the formatting, and I need each bibliographical entry to have a hanging indent and an empty line after it. I'm doing fine with this code:

\documentclass[12pt]{memoir}
\begin{document}
\par \noindent \hangindent=0.9cm Leyser, Karl J. \textit{Medieval Germany and Its Neighbours, 900--1250}. London, England: The Hambledon Press, 1982.\\
\par \noindent \hangindent=0.9cm Marongiu, Antonio. ``A Model State in the Middle Ages: The Norman and Swabian Kingdom of Sicily.'' \textit{Comparative Studies in Society and History} 6, iii (1964): 307--320.\\
\end{document}

Et cetera, but I'm sure there is a way to save myself all this formatting with one stroke by redefining the paragraph style at the beginning of the chapter.

I tried the titlesec package, but I'm afraid that although I've used it to format my section headings in the past, I don't know enough to make it work in this case.

I'd be very grateful if someone could point me in the right direction, and perhaps tell me how to switch back to the default paragraph style at the end of the bibliography...

Thank you in advance!

5
  • 1
    Welcome to TeX.SX! Do you think, it's a good idea to redefine the quite essential comment \par?
    – user31729
    Commented Apr 27, 2015 at 19:34
  • 1
    I do not advice it, but \let\LaTeXpar\par will store the original par, it can be redefined and later on \let\par\LaTeXpar, but I think you are after \parindent=0pt rather
    – user31729
    Commented Apr 27, 2015 at 19:37
  • You're quite right! I did not even think of \parindent! Thank you very much for the warning/reminder!
    – L13
    Commented Apr 27, 2015 at 19:53
  • Please take a look on the solution by Fran as well. Perhaps this what you want.
    – user31729
    Commented Apr 27, 2015 at 19:54
  • @ChristianHupfer LaTeX defines \@@par as the original (primitive) \par.
    – egreg
    Commented Apr 27, 2015 at 20:14

3 Answers 3

2

Just use the built-in mechanism, that is, list:

\documentclass[12pt]{memoir}

\usepackage{lipsum}

\newenvironment{mybib}
 {\section*{\bibname}
  \list{}{%
    \topsep=0pt
    \partopsep=0pt
    \parsep=0pt
    \leftmargin=0.9cm
    \itemindent=-\leftmargin
    \itemsep=\baselineskip}}
 {\endlist}

\begin{document}

\lipsum[2]

\begin{mybib}

\item Leyser, Karl J. \textit{Medieval Germany and Its Neighbours, 900--1250}. 
London, England: The Hambledon Press, 1982.

\item Marongiu, Antonio. ``A Model State in the Middle Ages: The Norman and 
Swabian Kingdom of Sicily.'' \textit{Comparative Studies in Society and History} 
6, iii (1964): 307--320.

\end{mybib}

\end{document}

enter image description here

2
  • Thank you very much for this solution! It hadn't occurred to me to try with a list, but it's a really neat idea. As I said above, I'll try this solution when I get home tonight, but it looks like it should work. I hadn't expected to get two great answers so fast! Thanks a bunch, everyone :) (And sorry I can't upvote answers yet!)
    – L13
    Commented Apr 27, 2015 at 20:06
  • Yep, I just tried this because it seemed like the quickest/most elegant solution, and it works perfectly! I did tweak the code a little to make the bibliography a chapter like this: \newenvironment{mybibliography} {\chapter*[Bibliography]{Bibliography} \addcontentsline{toc}{chapter}{Bibliography} \singlespacing \list{} {\topsep=0pt \partopsep=0pt \parsep=0pt \leftmargin=\parindent \itemindent=-\leftmargin \itemsep=\baselineskip}} {\endlist} And it works great.
    – L13
    Commented Apr 27, 2015 at 23:48
3

natbib is a powerful alternative:

\documentclass[12pt]{article}
\usepackage{lipsum}
\usepackage[authoryear]{natbib}
\setlength{\bibsep}{1\baselineskip}
\setlength{\bibhang}{0.9cm}

\begin{document}
\lipsum[2]

\begin{thebibliography}{}
\bibitem[Leyser(1982)]{ley82} Leyser, Karl J. \textit{Medieval Germany
    and Its Neighbours, 900--1250}.  London, England: The Hambledon
  Press, 1982.
\bibitem[Marongiu(1964)]{mar64} Marongiu, Antonio. ``A Model State in
  the Middle Ages: The Norman and Swabian Kingdom of Sicily.''
  \textit{Comparative Studies in Society and History} 6, iii (1964):
  307--320.
\end{thebibliography}
\end{document}

enter image description here

1
  • Thank you, that does look quite good. I'll keep it in mind if I start using natbib in the future!
    – L13
    Commented Apr 28, 2015 at 0:10
1

Use \everypar{} and \parskip:


MWE


\documentclass[12pt]{memoir}
\usepackage{kantlipsum}
\begin{document}
\kant[2]
\section*{References}
{\parindent0pt
\parskip\baselineskip
\everypar{\hangindent.9cm}

Leyser, Karl J. \textit{Medieval Germany and Its Neighbours, 900--1250}.
London, England: The Hambledon Press, 1982.

Marongiu, Antonio. ``A Model State in the Middle Ages: The Norman 
and Swabian Kingdom of Sicily.'' \textit{Comparative Studies in 
Society and History} 6, iii (1964): 307--320.

}    
\end{document}
3
  • 2
    if anything is going to come after the references, you should enclose that section in a group to localize the changed definitions. this would be even more important in a book, where these definitions would truly wreak havoc with an index. Commented Apr 27, 2015 at 19:43
  • Thank you, Fran, for the great solution, and thank you, Barbara, for the reminder to enclose these commands! I haven't tried this in practice yet, but I will later today, and it looks like just what I need.
    – L13
    Commented Apr 27, 2015 at 19:56
  • 1
    I ignored the last part of the question ("and then go back to the default"). I added {...} to the MWE, but for a big chunk of text may be is more clear \begingroup ... \endgroup.
    – Fran
    Commented Apr 27, 2015 at 21:39

You must log in to answer this question.

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