LaTeX forum ⇒ BibTeX, biblatex and biberSuppressing the "Reference" title in Bibtex Topic is solved

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

Suppressing the "Reference" title in Bibtex

Postby gavino » Wed Jun 19, 2019 3:44 pm

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] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[12pt,a4wide]{book}
  2. \usepackage[english]{babel}
  3. \usepackage[left=3 cm,right = 2.5 cm,top = 3.0 cm,bottom=2.5 cm]{geometry}
  4. \usepackage[onehalfspacing]{setspace}
  5. \usepackage{afterpage}
  6. \usepackage[titletoc,title,header,page]{appendix}
  7. \usepackage{bookmark,booktabs}
  8. \bookmarksetup{open,numbered}
  9.  
  10. %% Math and theorems, etc
  11. \usepackage{empheq, mathtools, amssymb, amsthm, amsfonts, dsfont, bm, mathrsfs, exscale, mathtools, listings}
  12. \newcommand{\matr}[1]{\mathbf{#1}}
  13. \usepackage{enumitem}
  14. \setcounter{MaxMatrixCols}{20}
  15. \usepackage{array}
  16. \usepackage{verbatim}
  17. \usepackage{amsmath}{
  18. \theoremstyle{plain}
  19. \newtheorem{assumption}{Assumption}
  20. \newtheorem{prop}{Proposition}
  21. \newtheorem*{res}{Result}
  22. \newtheorem*{corollary1}{Corollary to Proposition 1}
  23. \newtheorem*{corollary2}{Corollary to Proposition 2}
  24. \newtheorem*{corollary3}{Corollary to Proposition 3}}
  25. \numberwithin{equation}{chapter}
  26. \allowdisplaybreaks % allows for page breaks inside align
  27.  
  28.  
  29. %% Graphics/Figures/etc
  30. \usepackage{lmodern}
  31. \usepackage[T1]{fontenc}
  32. \usepackage{color}
  33. \usepackage{courier}
  34. \usepackage{xcolor}
  35. \usepackage{subfig}
  36. \usepackage[active]{srcltx}
  37. \usepackage[pdftex]{graphicx}
  38. \usepackage{pgfplots}
  39. \usepackage{tikz}
  40. % To externalize tikz -> but doesnt work
  41. %\usetikzlibrary{external}
  42. %\tikzexternalize[prefix=figz/]
  43. \graphicspath{./Figures/}
  44. \usetikzlibrary{shapes,arrows,decorations, decorations.markings}
  45. \usepgfplotslibrary{fillbetween,decorations.softclip}
  46. \usepackage{multirow}
  47. \usepackage{caption}
  48. %\usepackage[hang,small,bf]{caption}
  49. %\usepackage{subcaption}
  50. \newcommand{\folder}{./Figures/}
  51.  
  52.  
  53. %% Bib-file and citations
  54. \usepackage[authoryear]{natbib}
  55. \PassOptionsToPackage{normalem}{ulem}
  56. \usepackage{ulem}
  57.  
  58. %\usepackage[unicode=true,pdfusetitle,bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,breaklinks=true,pdfborder={0 0 0},pdfborderstyle={},backref=false,colorlinks=true]{hyperref}
  59. %\usepackage[backref=false,colorlinks=true]{hyperref}
  60. %\hypersetup{pdfborderstyle={},linkcolor={blue!40!black!70!},citecolor={blue!40!black!70!},urlcolor={blue!40!black!70!}}
  61.  
  62.  
  63. %% No intendation with footnotes
  64. \usepackage{marvosym}
  65. \usepackage{changepage}
  66. %\usepackage{scrextend}
  67. \usepackage[hang,flushmargin]{footmisc}
  68. \setlength{\footnotemargin}{3.25mm}
  69. \interfootnotelinepenalty=100
  70.  
  71.  
  72. %% Lyx specific commands
  73. \providecommand{\tabularnewline}{\\}
  74.  
  75. \usepackage{float}
  76. \usepackage{url}
  77.  
  78. \usepackage{soul}
  79. \usepackage{pdflscape}
  80. \usepackage{indentfirst}
  81.  
  82. \makeatletter
  83. \renewcommand\@biblabel[1]{}
  84. \renewenvironment{thebibliography}[1]
  85. {\section*{\refname}%
  86. \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
  87. \list{}%
  88. {\leftmargin0pt
  89. \@openbib@code
  90. \usecounter{enumiv}}%
  91. \sloppy
  92. \clubpenalty4000
  93. \@clubpenalty \clubpenalty
  94. \widowpenalty4000%
  95. \sfcode`\.\@m}
  96. {\def\@noitemerr
  97. {\@latex@warning{Empty `thebibliography' environment}}%
  98. \endlist}
  99.  
  100. \makeatother
  101.  
  102. \usepackage{diagbox}
  103. \usepackage{csquotes}
  104.  
  105. \DeclareCaptionFormat{myformat}{\fontsize{10}{13}\selectfont#1#2#3}
  106. \captionsetup{format=myformat}
  107.  
  108. \makeatletter
  109. \renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
  110. \thispagestyle{empty}% original style: plain
  111. \global\@topnum\z@
  112. \@afterindentfalse
  113. \secdef\@chapter\@schapter}
  114. \makeatother
  115.  
  116. \begin{document}
  117.  
  118. \chapter*{\empty}
  119.  
  120. \thispagestyle{empty}
  121. \afterpage{\null}
  122. \newpage\thispagestyle{empty}
  123.  
  124. \newpage\thispagestyle{empty}
  125. \begin{center}
  126. \vspace*{30 mm}
  127. \setcounter{page}{1}
  128. \pagenumbering{roman}
  129.  
  130. \chapter*{Acknowledgements}
  131. \chaptermark{Acknowledgements}
  132. %\input{thesis_acknowledgements.tex}
  133.  
  134. \newpage
  135. %\thispagestyle{empty}
  136.  
  137. \tableofcontents
  138. \addcontentsline{toc}{chapter}{Contents}
  139.  
  140. \newpage
  141. %\thispagestyle{empty}
  142. \setcounter{page}{1}
  143. \pagenumbering{arabic}
  144.  
  145. \chapter*{Introduction}
  146. \chaptermark{Introduction}
  147. \input{thesis_introduction.tex}
  148. \addcontentsline{toc}{chapter}{Introduction}
  149. \bookmarksetupnext{level=-1}
  150.  
  151. \newpage
  152. \thispagestyle{empty}
  153.  
  154. \chapter{Chapter 1}
  155. \chaptermark{Chapter 1}
  156. \input{chapter1.tex}
  157. \bookmarksetupnext{level=-1}
  158.  
  159. \newpage
  160. \thispagestyle{empty}
  161.  
  162. \chapter*{Bibliography}
  163. \chaptermark{Bibliography}
  164. \addcontentsline{toc}{chapter}{Bibliography}
  165. \bibliographystyle{apalike}
  166. \bibliography{thesis}
  167.  
  168.  
  169. \end{document}

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

Postby Johannes_B » Wed Jun 19, 2019 5:14 pm

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

Postby gavino » Wed Jun 19, 2019 8:54 pm

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] [Expand/Collapse] [Download] ({untitled.tex})
  1. \renewenvironment{thebibliography}[1]
  2. {\section*{\refname}{}%
  3. ...


to

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \renewenvironment{thebibliography}[1]
  2. {\chapter*{\refname}{}%
  3. ...


and it immediately worked.


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 1 guest