0

image of 1st chapterFollowing is main.tex of MWE

 \documentclass{report}
 \usepackage{xcolor}
\definecolor{blue}{RGB}{243,102,25}
\usepackage[english]{babel}
\usepackage{enumitem}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{booktabs}
\usepackage{pdflscape}
\usepackage{csquotes}
\input{structure}

\begin{document}
\tableofcontents
\chapter{Chapter1}
\input{ch1} 
\chapter*{Bibliography}
\addcontentsline{toc}{chapter}{\textcolor{blue}{Bibliography}} \printbibliography[heading=none]
\end{document}

Following is structure.tex of MWE:

\usepackage[

backend=biber, style=numeric, sorting=nyt, sortcites=true, autopunct=true, autolang=hyphen, abbreviate=false, backref=true, ]{biblatex} \defbibheading{bibempty}{} \addbibresource{Reference.bib}

Following is Reference.bib for MWE:

@book{1.1, title={Securing critical information infrastructure: Global perspectives and practices}, author={Sharma, Munish}, year={2017}, publisher={Institute for Defence Studies and Analyses} } 

Following is Ch1.tex of MWE:

The reference used here is \cite{1.1}

This works well and gives output pdf file.

19
  • 1
    Please make a full but minimal example others can copy and test as is. See tex.meta.stackexchange.com/q/228, we cannot test your code here as there is no document class (which might contain stuf that are important)
    – daleif
    Mar 13 at 10:38
  • Normally \chapter*{Bibliography} \addcontentsline{toc}{chapter}{\textcolor{blue}{Bibliography}} are bit needed. And where does \chapterimage come from?
    – daleif
    Mar 13 at 10:39
  • @daleif there is an image file to be placed at the top of the first page of each chapter. So, \chapterimage is used.
    – SDe
    Mar 13 at 11:10
  • None of the code you provided defines \chapterimage and thus your code cannot be test by us. So how exactly are we suppose to help you?
    – daleif
    Mar 13 at 11:24
  • 1
    There's no way to know if this is the problem without an MWE, but you seem to call \addbibresource twice with the same argument. One of those uses appears to be in the body, where \addbibresource cannot be used.
    – vjeffcott
    Mar 13 at 12:17

1 Answer 1

2

In the example you get double the bibliography headings and empty pages, because the example explicitly produces a new "Bibliography" chapter with \chapter* and then \printbibliography does the same.

Ideally you would just let \printbibliography generate the heading. If you want the bibliography to appear in the table of contents, use the option heading=bibintoc. This will not, however, make the entry in the ToC blue. If you need that, it is probably easiest to manually take over printing the heading and tell biblatex not to print any heading with heading=none,.

\documentclass{report}
\usepackage{xcolor}
\definecolor{blue}{RGB}{243,102,25}
\usepackage[english]{babel}
\usepackage[
  backend=biber,
  style=numeric,
  sorting=nyt,
  sortcites=true,
  autopunct=true,
  autolang=hyphen,
  abbreviate=false,
  backref=true,
]{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}
\tableofcontents
\chapter{Chapter1}
The reference used here is \cite{sigfridsson}
\chapter*{Bibliography}
\addcontentsline{toc}{chapter}{\textcolor{blue}{Bibliography}}
\printbibliography[heading=none]
\end{document}

ToC

You must log in to answer this question.

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