BibTeX, biblatex and biberSuppressing the "Reference" title in Bibtex

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
gavino
Posts: 2
Joined: Wed Jun 19, 2019 3:19 pm

Suppressing the "Reference" title in Bibtex

Post by gavino »

Dear all,

I am having trouble suppressing the automatically appearing "Reference" title using bibtex in the book article class/ environment. Instead, I want to use \chapter*{Bibliography} (which I also add to the TOC) to have the heading in the same style as other chapters in the book, as you can see at the very end of the code below.

Several solutions have been proposed in other forums, like switching to biblatex or for different article classes like report, article, etc. So I hope there's someone out there to help me.

Below I've added the code. Given that the book consists of multiple chapters (here I only show chapter 1), I'm loading a bunch of packages, which is most likely not the most elegant way, but it works and I want to show all of them to you just for completeness.

Thanks in advance! Best,
Gavino

Code: Select all

\documentclass[12pt,a4wide]{book}
\usepackage[english]{babel}
\usepackage[left=3 cm,right = 2.5 cm,top = 3.0 cm,bottom=2.5 cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage{afterpage}
\usepackage[titletoc,title,header,page]{appendix}
\usepackage{bookmark,booktabs}
\bookmarksetup{open,numbered}

%% Math and theorems, etc
\usepackage{empheq, mathtools, amssymb, amsthm, amsfonts, dsfont, bm, mathrsfs, exscale, mathtools, listings}
\newcommand{\matr}[1]{\mathbf{#1}}
\usepackage{enumitem}
\setcounter{MaxMatrixCols}{20}
\usepackage{array}
\usepackage{verbatim} 
\usepackage{amsmath}{
	\theoremstyle{plain}
	\newtheorem{assumption}{Assumption}
	\newtheorem{prop}{Proposition}
	\newtheorem*{res}{Result}
	\newtheorem*{corollary1}{Corollary to Proposition 1}
	\newtheorem*{corollary2}{Corollary to Proposition 2}
	\newtheorem*{corollary3}{Corollary to Proposition 3}}
\numberwithin{equation}{chapter}
\allowdisplaybreaks % allows for page breaks inside align


%% Graphics/Figures/etc
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{color}
\usepackage{courier}
\usepackage{xcolor}
\usepackage{subfig}
\usepackage[active]{srcltx}
\usepackage[pdftex]{graphicx}
\usepackage{pgfplots}
\usepackage{tikz}
% To externalize tikz -> but doesnt work
%\usetikzlibrary{external}
%\tikzexternalize[prefix=figz/]
\graphicspath{./Figures/}
\usetikzlibrary{shapes,arrows,decorations, decorations.markings} 
\usepgfplotslibrary{fillbetween,decorations.softclip}
\usepackage{multirow}
\usepackage{caption} 
%\usepackage[hang,small,bf]{caption}
%\usepackage{subcaption}
\newcommand{\folder}{./Figures/}


%% Bib-file and citations
\usepackage[authoryear]{natbib}
\PassOptionsToPackage{normalem}{ulem}
\usepackage{ulem}

%\usepackage[unicode=true,pdfusetitle,bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,breaklinks=true,pdfborder={0 0 0},pdfborderstyle={},backref=false,colorlinks=true]{hyperref}
%\usepackage[backref=false,colorlinks=true]{hyperref}
%\hypersetup{pdfborderstyle={},linkcolor={blue!40!black!70!},citecolor={blue!40!black!70!},urlcolor={blue!40!black!70!}} 


%% No intendation with footnotes
\usepackage{marvosym}
\usepackage{changepage}
%\usepackage{scrextend}
\usepackage[hang,flushmargin]{footmisc} 
\setlength{\footnotemargin}{3.25mm}
\interfootnotelinepenalty=100


%% Lyx specific commands
\providecommand{\tabularnewline}{\\}

\usepackage{float}
\usepackage{url}

\usepackage{soul}
\usepackage{pdflscape}
\usepackage{indentfirst}
   
\makeatletter
\renewcommand\@biblabel[1]{}
\renewenvironment{thebibliography}[1]
     {\section*{\refname}%
      \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
      \list{}%
           {\leftmargin0pt
            \@openbib@code
            \usecounter{enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
  
\makeatother
   
\usepackage{diagbox}
\usepackage{csquotes}

\DeclareCaptionFormat{myformat}{\fontsize{10}{13}\selectfont#1#2#3}
\captionsetup{format=myformat}

\makeatletter
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
                    \thispagestyle{empty}% original style: plain
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\@chapter\@schapter}
\makeatother

\begin{document}
 
\chapter*{\empty}

\thispagestyle{empty}
\afterpage{\null}
\newpage\thispagestyle{empty}
 
\newpage\thispagestyle{empty}
\begin{center}
\vspace*{30 mm}
\setcounter{page}{1}
\pagenumbering{roman}

\chapter*{Acknowledgements}
\chaptermark{Acknowledgements}
%\input{thesis_acknowledgements.tex}

\newpage
%\thispagestyle{empty}

\tableofcontents
\addcontentsline{toc}{chapter}{Contents}

\newpage
%\thispagestyle{empty}
\setcounter{page}{1} 
\pagenumbering{arabic}

\chapter*{Introduction}
\chaptermark{Introduction}
\input{thesis_introduction.tex}
\addcontentsline{toc}{chapter}{Introduction}
\bookmarksetupnext{level=-1}

\newpage
\thispagestyle{empty}

\chapter{Chapter 1}
\chaptermark{Chapter 1}
\input{chapter1.tex}
\bookmarksetupnext{level=-1}

\newpage
\thispagestyle{empty}

\chapter*{Bibliography}
\chaptermark{Bibliography}
\addcontentsline{toc}{chapter}{Bibliography} 
\bibliographystyle{apalike}
\bibliography{thesis}


\end{document}

Recommended reading 2024:

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

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

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Suppressing the "Reference" title in Bibtex

Post by Johannes_B »

In your code you have a renewenvironment for thebibliography. look at the start, there you see the section. Replace it and the mark commands with the ones you are using at the very end.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
gavino
Posts: 2
Joined: Wed Jun 19, 2019 3:19 pm

Suppressing the "Reference" title in Bibtex

Post by gavino »

Johannes_B wrote:In your code you have a renewenvironment for thebibliography. look at the start, there you see the section. Replace it and the mark commands with the ones you are using at the very end.
Johannes, thanks a million! I've spent way too much time on this ... certainly should have asked the crowd before.
Just to be clear for everyone, I've "simply" changed

Code: Select all

\renewenvironment{thebibliography}[1]
     {\section*{\refname}{}%
     ...
to

Code: Select all

\renewenvironment{thebibliography}[1]
     {\chapter*{\refname}{}% 
     ...
and it immediately worked.
Post Reply