Search code examples
latexoverleaf

Bibliography is not showing up in Overleaf


I am using this template in my overleaf Report:

https://www.overleaf.com/project/60c75f5e234ec24080f0ea6a

If link is not accesible here is the code:

\documentclass [11pt]{article}

\title{Fuel Cell Technology\\\medskip An Annotated Bibliography}
\author{Titus Barik ([email protected])\\Georgia Institute of Technology}

\begin{document}
\maketitle
\nocite{*}
\bibliographystyle{IEEEannot}
\bibliography{annot}
\end{document}

annot.bib file

@InProceedings{Wang99,
  author    = {Yanqing Wang and Christine MacKenzie},
  title     = {Object Manipulation in Virtual Environments: Relative Size Matters},
  booktitle = {Proc. CHI'99},
  year      = {1999},
  month     = {May},
  annote    = {.}
}

%%

@InProceedings{Feiner93,
  author    = {S. Feiner and B. MacIntyre and M. Haupt and E. Solomon},
  title     = {Windows on the World: {2D} Windows for {3D} Augmented Reality},
  booktitle = {Proc. UIST'93},
  year      = {1993},
  pages     = {145-155},
  annote    = {I.}
}

I am new to latex coding but fixed most of the bugs but stuck at printing the references in the final page of my report.

I took the contents annot.bib file and pasted in my overleaf report as follows:

\bibliography{annot}
\end{document}

Output is only showing References as heading and no references inside.

My code:

https://www.overleaf.com/read/wnhgtcggncff

My file:

    \documentclass[fleqn,10pt]{olplainarticle}
% Use option lineno for line numbers 
\usepackage{graphics}
%\newcommand{\newpar}{\vspace{.2in}\noindent}
\usepackage{hyperref}

\let\oldhref\href
\renewcommand{\href}[2]{\oldhref{#1}{\bfseries#2}}


\begin{document}

\begin{center}
    \includegraphics[width=0.2\textwidth]{IIT Hyderabad Logo_Final Design.jpeg}
\end{center}

\begin{center}
ABC
\end{center}


\section*{abstract}



\section*{Introduction}


\section*{Methods and Materials}


\begin{table}[ht]
\centering
\begin{tabular}{l|r}
 \\\hline
 \\
A & B
\end{tabular}
\caption{\label{tab:widgets}An exploration table.}
\end{table}


\section*{AL}
%\label{sec:examples}
%\noindent
    


……….



%\subsection*{Figures and Tables}

\begin{figure}
\centering
    \includegraphics[width=0.7\textwidth]{download.png}
    \caption{Diagram illustrating the three main active learning scenarios.}
    \label{fig:view}

 
\end{figure}


\section*{DP}



\begin{figure}[ht]
\centering
    \includegraphics[width=0.7\textwidth]{Picture 1.png}
    \caption{Dealing with lack of annotated data}
    \label{fig:view}

    \includegraphics[width=0.7\textwidth]{Picture 2.png}
    \caption{Pipeline}
    \label{fig:view}
\end{figure}



\begin{figure}[ht]
\centering
    \includegraphics[width=0.7\textwidth]{dp.png}
    \caption{Architecture Diagram}
    \label{fig:view}
\end{figure}


\section*{Acknowledgments}
\bibliography{annot}

\end{document}

I am not getting References in Output and getting warning You have used the same label more than once. Check that each \label{...} labels only one item.


Solution

  • The problem is that your document class already selects a bibliography style, which you can't change afterwards. Two workarounds:

    • use the style your document class sets by removing \bibliographystyle{IEEEannot} from your code

    • if you actually do need the other style, save olplainarticle.cls under a new name and change l.8 \ProvidesClass{olplainarticle}[06/12/2015, v1.0] to the new name, remove line 43/44 \RequirePackage{natbib} \bibliographystyle{apalike} from the new .cls file and then change \documentclass{olplainarticle} to the new name