# LaTeX Warning: Citation undefined

Sample running code:

\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{./IEEEabrv,./references/ref}

\end{document}


It seems like a very simple question/answer but I can not find the error/solution to my problem. I am trying to understand why IEEEtran class is the problem of the code. While I am compiling the current example I keep getting this error:

LaTeX Warning: Citationref:thanos' on page 1 undefined on input line 21.

I know that this question has been answered here Undefined citation warnings, which states that the user should compile the code with the following process:

1. latex
2. bibtex
3. latex
4. latex

I tried the following process, but unfortunately, my problem was not solved.

If I change my \bibliographystyle{plain} and \bibliography{./references/ref} it compiles normally. I have also include the IEEEtran.cls in the same compiling file but unfortunately did help.

Also I tried to compile with LaTeXiLa and a different error is printed:

latexmk -pdf -synctex=1 name.tex
Rule 'bibtex name': File changes, etc:
Non-existent destination files:
'name.bbl'
Latexmk: I WON'T RUN 'bibtex configuration' because I don't find the following files:
./IEEEabrv.bib
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs of latex/pdflatex.
Latexmk: applying rule 'bibtex configuration'...
Latexmk: Errors, so I did not complete making targets


As a next step I deleted all files apart from the .tex file and the reference file, still the same error (terminal and compiler).

The reference sample that I am using:

@online {ref:thanos,
title = {Statistics},
year = {2014},
month = {Mar.},
urldate = {2014-03-05},
howpublished = {\url{http://www.itu.int/en/ITU-D/Statistics/Pages/stat/default.aspx#}}
}


I also tried the format of the reference to @MISC but unfortunately the error is not solved.

I am not 100% sure if I am using biblatex or bibtex, so I am sorry I can not provide more information about it.

Has anybody encounter the same error? I can not find similar information or solution. Thanks in advance for your time and effort.

-
well you should be running bibtex but as yiou showed in the error message it did not run as you haven't got  ./IEEEabrv.bib did you mean to have ./IEEEabrv in the \bibliography command (which tries to load a .bib file of that name? – David Carlisle Mar 28 '14 at 23:24
@DavidCarlisle, to be honest I found an example here where I followed their structure \bibliography{IEEEabrv,mybibfile}. This is not the correct way to define the IEEEabrv ref.? – Thanos Mar 28 '14 at 23:35
It's legal syntax but only if you have two bibliography files to load, IEEEabrv.bib and mybibfile.bib. – David Carlisle Mar 29 '14 at 0:00
@DavidCarlisle, ok so I guess the correct format for my use would be: \bibliographystyle{./IEEEtran} and \bibliography{./references/ref}. It is extra and unecessary the part \bibliography{./IEEEabrv}. I removed this extra line and I also added the usepackage{cite} but still the same error. – Thanos Mar 29 '14 at 0:13
To find the error, you should have ignored the warning from latex (which just meant bibtex had not made the bibliography) and concentrated on bibtex. With the ./ before the bibtex style I get I couldn't open style file ./IEEEtran.bst ---line 20 of file bt77.aux : \bibstyle{./IEEEtran  which is bibtex telling you that it can not find the file ./IEEtran.bib in the current directory – David Carlisle Mar 29 '14 at 1:28

It works for me after

pdflatex file
bibtex file
pdflatex file
pdlfatex file


I removed the ./ from the bibliography style as it isn't 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}

-
You are absolutely right. Is it possible to provide with some more information/reference to read more about the (./) before the file. As I see it in many examples and I might miss using it. Thank you in advance for your time and effort. – Thanos Mar 29 '14 at 0:58
@Thanos well the file path syntax is basically just sent to the operating system, but just as if you are running a command ./foo is essentially an absolute path to a file foo in the current directory but foo searches the input path (in TeX's case looking in current directory first) – David Carlisle Mar 29 '14 at 1:02
if I understand correctly. I am defining a starting point from ,.foo and then since I have a file reference and in that file ref, I do not need ./ again because it will produce confusion to the system. Thank you for your time and effort I will try to read more upon it. – Thanos Mar 29 '14 at 1:11
Not "not need" if you are in c:/a/b/c then ./foo is a request for c:/a/b/c/foo.bib so the bibtex file path is not used. but if you use foo` then the current directory and every directory on the bibinputs path is checked. So the commands mean different things, the system doesn't get confused (just users:-) – David Carlisle Mar 29 '14 at 1:23
Again thank you for your time and effort. You helped me a lot. I know my question was not something special but I could not figure out why was not working properly. Best Regards, Thanos – Thanos Mar 29 '14 at 9:35