Lost my hanging indents

jherman's picture

My bibliography continues to haunt me. I've seemed to have lost my hanging indents. I'm using apalike, and everything seems ok with it, but it won't give me the hanging indents I'm looking for. I've attached some files for reference.

AttachmentSize
bu_ece_thesis.cst26.86 KB
IJES.bib3.55 KB
APALIKE.STY2.31 KB
Dissertation 13Dec2014aa.tex4.03 KB
Dissertation 13Dec2014aa.pdf37.17 KB
jherman's picture

That did it. This should

That did it. This should keep the typesetting police off my back now :). Thanks again.

jherman's picture

Question on double spacing.

Question on double spacing. A final question on the bibliography...I hope. The code below produces a bibliography that is 2-1/2 lines spaced between items, instead of the standard double space between items. A two line item is double spaced between the two lines though, and the entire rest of the document is double spaced properly. I'm assuming that another simple addition to the preamble for the bibliography will fix this, but because this is not my area of expertise, I'm reaching out again for a solution. Thanks.

John MacKendrick's picture

This code essentially creates

This code essentially creates a list. You can reduce the amount of space between items by adding the command

 \addtolength{\itemsep}{-6pt}

Somewhere in the list parameters. The code will then look something like this:

 \list{\@biblabel{\@arabic\c@enumiv}}%
          {\settowidth\labelwidth{\@biblabel{#1}}%
          \leftmargin\bibindent
          \setlength{\itemindent}{-\leftmargin}
          \addtolength{\itemsep}{-6pt}
          \@openbib@code
          \usecounter{enumiv}%
          \let\p@enumiv\@empty

Note that if this does not produce the exact spacing, you can adjust the value of the "-6pt".

jherman's picture

Thanks John, that did it!

Thanks John, that did it! Maybe a similar approach may help on my other problem with the page number (see other post). I've seemed to have tracked it down to a problem where the bibliography is trying to put too many listings on the first page. If I delete some of the citations such that I have, let's say, a half page, the page number appears where it needs to be. Is there a command that can be added to the preamble that limits the number of listings on a bibliography page, or helps to set the break point?

The issue is that the

The issue is that the pagestyle must be changed after the Bibliography chapter heading.  This can't be done from inside the document.  Redefining the thebibliography environment also gives the chance to make this change.  In John's post, change this line:

    {\chapter*{{Bibliography}

to this line:

    {\chapter*{{Bibliography}\thispagestyle{myheadings}
jherman's picture

It worked! I REALLY

It worked! I REALLY appreciate the assistance. I've spent hours/days trying to debug these two "little" problems, so I'm grateful that you spent some of your time to help. Thanks.

John MacKendrick's picture

One way to handle this is to

One way to handle this is to redefine the bibliography in the document preamble. Adding the commands

\makeatletter
\def\@biblabel#1{\hspace*{-\labelsep}}
\renewenvironment{thebibliography}[1]
    {\chapter*{{Bibliography}
       \@mkboth{Bibliography}{Bibliography}}
     \list{\@biblabel{\@arabic\c@enumiv}}%
          {\settowidth\labelwidth{\@biblabel{#1}}%
          \leftmargin\bibindent
          \setlength{\itemindent}{-\leftmargin}
          \@openbib@code
          \usecounter{enumiv}%
          \let\p@enumiv\@empty
          \renewcommand\theenumiv{\@arabic\c@enumiv}}%
     \sloppy\clubpenalty4000\widowpenalty4000%
     \sfcode`\.\@m}
    {\def\@noitemerr
      {\@latex@warning{Empty `thebibliography' environment}}%
     \endlist}
\makeatother

to the document preamble seems to provide a hanging indent.