LaTeX Warning: Citation undefined
It works for me after running
pdflatex file
bibtex file
pdflatex file
pdflatex file
I removed the ./
from the bibliography style as it is not installed in the current directory.
I saved the bibliography entry you posted as ref.bib
in the current directory, and the code below as file.tex
\documentclass[a4paper,11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[hidelinks]{hyperref} % Hyperref package for url's and [hidelinks] option to remove collouring
\title{Test}
\author{Thanos}
\begin{document}
\maketitle
\tableofcontents
\begin{abstract}
This is abstract
\end{abstract}
\section{Section 1}
Referecnce example~\cite{ref:thanos}
\bibliographystyle{IEEEtran}
\bibliography{ref}
\end{document}
David Carlisle's answer is very thorough, but I recently faced the same situation when I was working on a second paper, and wanted it to have the same format as my first paper. I copied over the .cls file, the .tex file and the .bib file and received the exact same error as OP.
LaTeX Warning: Citationref:thanos' on page 1 undefined on input line 21.
Following the previous answer's steps I was unable to resolve my issue. Turns out that in order to solve my problem I also needed to copy over the .bst file from my first paper's folder or the bibliography style file. Copying over the .bst file, I was able to resolve my issue.
I've recently experienced the same problem when typing my PhD thesis.
It has a master file and all the chapters and etc. are added with \input
command.
Recently to speed up the compilation time, I started using \includeonly
. I did not have this error until I replaced \input
with \include
to add the chapters. Then, I realized that \chapterbib
is suitable to work with \include
not with \input
. So, when I was using \input
, \chapterbib
was idle and I never needed it because I print the bibliography at the end of the thesis, not separately for each chapter.
Long story short, I deactivated \chapterbib
and it started to work normally again. Hope this can help to the ones experiencing the same difficulty.