1

I am trying to add a bobliography to my report the following way. But, it wouldn't happen. Checked a lot of tutorials and documentations, but I wasn't able to display it. Any brilliant idea, please?

\documentclass[12pt, openany]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{libertine}
\usepackage{amsmath} 
\usepackage{amsfonts}
\usepackage{soul}
\usepackage[left=1cm,right=1cm,top=1cm,bottom=1cm]{geometry}
\usepackage{graphicx} %inclusion de figures
\usepackage{pstricks,pst-node} %Graphiques
\newcommand{\hsp}{\hspace{20pt}}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newlength\mytemplength
\newcommand\parboxc[3]{%
    \settowidth{\mytemplength}{#3}%
    \parbox[#1][#2]{\mytemplength}{\centering #3}%
}
\usepackage{verbatimbox}
\newcommand{\ts}{\textsuperscript}

% for custom chapter
\usepackage[svgnames, x11names]{xcolor}
\newcommand*\ftsize[1]{\fontsize{#1pt}{\numexpr 1.2*#1\relax pt}\selectfont}
\newcommand*\chapsubtitle[1]{{\LARGE #1}}
\newcommand\maketabular[1]{\begin{tabular}[b]{l}
  #1
\end{tabular}}
\usepackage{colortbl} 
\usepackage{titlesec}
\titleformat{\chapter}[block]{\usefont{T1}{phv}{m}{n}}{%
\vskip -120pt
\hspace{-10pt}
\begin{tabular}[b]{c !{\color{gray}\vline width1.5pt}}{\large\color{gray} \textls{CHAPITRE}}\\[2ex] \fontsize{40}{40}\selectfont\thechapter\end{tabular}}{1em}{\bfseries\fontsize{30}{30}\selectfont\maketabular}%[]

% to fix float's positions by being able to use the H property
\usepackage{float}

% for another level of subsections (subsubsubsection)
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}

% set the margins
\newgeometry{vmargin={30mm}, hmargin={20mm}}

% config of the header & footer
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\lhead{\leftmark}
\rfoot{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

% fix footnote's position to bottom
\usepackage[bottom]{footmisc}
\usepackage{setspace}

% for tikz positioning
\usepackage{tikz}
\usepackage{tkz-graph}
\usetikzlibrary{chains, decorations.pathreplacing, shapes.multipart, positioning}

% making the table of content clickable
\usepackage{hyperref}

% bibliography
\usepackage{cite}
\usepackage[backend=biber]{biblatex}
\addbibresource{3-appendices/references.bib}

% URLs
\usepackage{url}

% appendixes
\usepackage{hyperref}
\usepackage{cleveref}

% for blank pages
\usepackage{afterpage}

% paragraph formatting
\renewcommand{\baselinestretch}{1.4}

\begin{document}

\include{0-configuration/configurations}
\include{1-opening/1.1-cover}
%\pagenumbering{roman}

\newpage
\thispagestyle{empty}
\afterpage{\null\newpage}

\newpage
\include{1-opening/1.2-signings}

\newpage
\include{1-opening/1.3-acknowledgments}
\include{1-opening/1.4-abstract}

\newpage
\tableofcontents
\listoffigures
\listoftables

\newpage
\include{2-chapters/2.0-introduction}

\printbibliography[title = {References}]
\addcontentsline{toc}{chapter}{\protect\numberline{}References}

\end{document}

Thank you in advance!

joe coe
  • 11
  • https://en.wikibooks.org/wiki/LaTeX/Bibliographies_with_biblatex_and_biber You have to use an extra tool to generate something that LaTeX can handle. – Johannes_B Sep 04 '18 at 05:01
  • You seem to use a template you found somewhere. It is bad. You cannot use cite package with biblatex. I suggest to use a minimal template – Johannes_B Sep 04 '18 at 05:02
  • 1
    At the moment all we can say is that cite and biblatex are incompatible. Since you use the biblatex commands \printbibliography and \addbibresource you should drop \usepackage{cite}. You will also have to run Biber instead of BibTeX on your document. See https://tex.stackexchange.com/q/154751/35864 for concrete help with that and https://tex.stackexchange.com/q/63852/35864 for a bit of background. You also should not load packages multiple times (hyperref), and usually hyperref should be the last package loaded (cleveref is an exception and must be loaded after hyperref). – moewe Sep 04 '18 at 15:36
  • Any news here? Did removing cite and running LaTeX, Biber, LaTeX, LaTeX as suggested in the last comment help? – moewe Sep 06 '18 at 05:34
  • Any news here? At the moment we can't really tell what is going on here. We can only suggest the standard answers https://tex.stackexchange.com/q/63852/35864 and https://tex.stackexchange.com/q/13509/35864. – moewe Sep 09 '18 at 10:44

1 Answers1

1

The code example is not really minimal (it loads unrelated packages) and not really working (it has many \includes whose contents we don't know).


One definite source of error in the preamble is the fact that the cite package and biblatex are both loaded. But the two packages are incompatible and only one of the two can be loaded. The remaining code suggests you use biblatex, so you should probably just remove \usepackage{cite}.


\printbibliography[title = {References}]
\addcontentsline{toc}{chapter}{\protect\numberline{}References}

should be replaced by

\printbibliography[title = {References}, heading=bibintoc]

You should also try to load packages only once. Load only the packages you need. hyperref should normally be loaded last (there are a few exceptions to this rule: cleveref for example must be loaded after hyperref).

moewe
  • 175,683