GeneralRemove blank page before bibliography chapter

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
madiga01
Posts: 2
Joined: Sat Oct 23, 2010 5:54 am

Remove blank page before bibliography chapter

Post by madiga01 »

Hi,

I'm reasonably new to latex and have just about finished my honours thesis using it. Just one thing holding me back, I want the bibliography to be called references and to be a chapter. Therefore I used \renewcommand{\bibname}{\chapter{References}}. However for some reason this causes a blank page to be inserted before the references. This does not occur before other chapters. I would prefer it if there were no blank page. A minimal working example is given. I have tried \nopagebreak to no avail. I'm not sure if it has any effect, but I'm using pdflatex in MikTex 2.8. Any help would be great.
Thanks.

Code: Select all

\documentclass{report}
\begin{document}
\renewcommand{\bibname}{\chapter{References}}
\chapter{a chapter}
\chapter{another chapter}
there is no blank page between this chapter and the previous.
\begin{thebibliography}{9}

\bibitem{lamport94}
  Leslie Lamport,
  \emph{\LaTeX: A Document Preparation System}.
  Addison Wesley, Massachusetts,
  2nd Edition,
  1994.

\end{thebibliography}

\end{document}
Last edited by madiga01 on Fri Oct 29, 2010 2:08 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Remove blank page before bibliography chapter

Post by gmedina »

Hi,

a simple redefinition of the thebibliography environment (as defined in report.cls) will do the job:

Code: Select all

\documentclass{report}

\makeatletter
\renewcommand{\bibname}{References}
\renewenvironment{thebibliography}[1]
     {\chapter{\bibname}%
      \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother

\begin{document}

\chapter{a chapter}
\chapter{another chapter}
there is no blank page between this chapter and the previous.

\begin{thebibliography}{9}
\bibitem{lamport94}
  Leslie Lamport,
  \emph{\LaTeX: A Document Preparation System}.
  Addison Wesley, Massachusetts,
  2nd Edition,
  1994.
\end{thebibliography}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
madiga01
Posts: 2
Joined: Sat Oct 23, 2010 5:54 am

Re: Remove blank page before bibliography chapter

Post by madiga01 »

Worked great, thanks a lot.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Remove blank page before bibliography chapter

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic accordingly as clearly written in Section 3 of the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.


Best regards and welcome to the board
Thorsten
Post Reply