# LaTeX Warning: There were undefined references

My template draft1.tex is as follow:

\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{comment}
\usepackage{tikz-feynman}

\usepackage{graphicx,epstopdf,epsfig,xcolor}
\usepackage{geometry}
\geometry{left=2 cm,right=2 cm,top=2 cm,bottom=2 cm}

\usepackage[backend=biber]{biblatex}
\usepackage{hyperref}
\hypersetup{
filecolor=magenta,
urlcolor=cyan,
}
\urlstyle{same}

\begin{document}
\section{Introduction}
\feynmandiagram [horizontal=a to b] {
i1 [particle=$$e^{-}$$] -- [fermion] a -- [fermion] i2 [particle=$$e^{+}$$],
a -- [photon, edge label=$$\gamma$$, momentum'=$$k$$] b,
f1 [particle=$$\mu^{+}$$] -- [fermion] b -- [fermion] f2 [particle=$$\mu^{-}$$],
};

One of the alternative approach to solve hierarchy problem is \cite{ADD} model
which introduced by Arkani-Hamed, Dimopoulos and Dvali.
\begin{thebibliography}{9}
N. Arkani-Hamed, S. Dimopoulos, and G. Dvali, Phys. Lett. B 429, 263 (1998);
preprint \href{https://arxiv.org/abs/hep-ph/9807344}{hep-ph/9807344}.
\end{thebibliography}
\end{document}


After running xelatex draft1.tex

Package tikz-feynman Warning: LuaTeX is required if you wish to have vertices a
utomatically placed. You can disable this warning by setting /tikzfeynman/warn
luatex=false on input line 21.

mpat=1.1.0]{tikz-feynman} so that you can be warned if TikZ-Feynman changes. on
input line 21.

*geometry* driver: auto-detecting
*geometry* detected driver: xetex
No file draft1.bbl.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./draft1.out) (./draft1.out)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/se-ascii-print.def)

Package tikz-feynman Warning: The key you tried to use '/tikz/horizontal' requi
res LuaTeX. It will be ignored. on input line 23.

Package tikz-feynman Warning: The key you tried to use '/graph drawing/node dis
tance' requires LuaTeX. It will be ignored. on input line 23.

Package tikz-feynman Warning: The key you tried to use '/graph drawing/level di
stance' requires LuaTeX. It will be ignored. on input line 23.

Package tikz-feynman Warning: The key you tried to use '/graph drawing/sibling
distance' requires LuaTeX. It will be ignored. on input line 23.

Package tikz-feynman Warning: The key you tried to use '/tikz/graphs/spring lay
out' requires LuaTeX. It will be ignored. on input line 23.

Package tikz-feynman Warning: The key you tried to use '/tikz/horizontal' requi
res LuaTeX. It will be ignored. on input line 23.

LaTeX Warning: Citation 'ADD' on page 1 undefined on input line 31.

[1] (./draft1.aux)

LaTeX Warning: There were undefined references.

Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                draft1
(biblatex)                and rerun LaTeX afterwards.

)
Output written on draft1.pdf (1 page).
Transcript written on draft1.log.


And the outcome pdf is like this

How can I use package tikz-feynman and biblatex properly?

• Welcome to TeX.SX! You always have to run biber and then xelatex again to show the references correctly. But note that you should do like the warning says (switch to LuaLaTeX) if you want to get full access to all tikz-feynman features. – TeXnician Sep 22 '17 at 5:31
• You are mixing biblatex's automatic bibliography system with the manual thebibliography, that can't work. You need to decide on one system. Either use biblatex (see biblatex in a nutshell (for beginners)) and drop thebibliography; or use thebibliography and drop \usepackage[backend=biber]{biblatex}. – moewe Sep 22 '17 at 5:39
• unrelated to references but don't load epstopdf or epsfig packages (the first is loaded automatically by graphicx when needed and the second should not be used for any document written after about 1994) – David Carlisle Sep 22 '17 at 6:39
• @Bobyandbob I did not find a good duplicate, so I typed up a quick answer. Comments are welcome. – moewe Nov 11 '17 at 13:05
• – moewe Jun 3 '18 at 12:56

You can't use thebibliography and biblatex at the same time. thebibliography gives you full control over the entire bibliography, but you have to type everything in manually. biblatex, on the other hand, can create the bibliography for you automatically if you provide it with a .bib file. Have a look at https://en.wikibooks.org/wiki/LaTeX/Bibliography_Management for a more detailed introduction to all the possible bibliography systems with TeX.

If you want to use biblatex, remove thebibliography, create a .bib file and print the bibliography with \printbibliography. See also biblatex in a nutshell (for beginners). Your document could look like this

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=numeric, backend=biber]{biblatex}

\begin{document}
Lorem~\cite{sigfridsson}

\printbibliography
\end{document}


where biblatex-examples.bib would contain an entry for sigfridsson that could look like

@article{sigfridsson,
author       = {Sigfridsson, Emma and Ryde, Ulf},
title        = {Comparison of methods for deriving atomic charges from the
electrostatic potential and moments},
journaltitle = {Journal of Computational Chemistry},
date         = 1998,
volume       = 19,
number       = 4,
pages        = {377-395},
doi          = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}


If you want to use a manual bibliography with thebibliography, drop the call to biblatex. In that case your document could look like

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}

\usepackage{csquotes}
\usepackage{url}
\ifundef\doi
{\DeclareUrlCommand\doi{}}
{}

\begin{document}
Lorem~\cite{sigfridsson}

\begin{thebibliography}{1}

\bibitem{sigfridsson} Emma Sigfridsson and Ulf Ryde.
\enquote{Comparison of methods for deriving atomic charges
from the electrostatic potential and moments}.
In: \emph{Journal of Computational Chemistry} 19.4 (1998),
pp. 377–395.
\textsc{doi}: \doi{710.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P}.

\end{thebibliography}
\end{document}


It is a good idea to delete all temporary auxiliary files (.aux, .bbl, .bcf, ...) after changes to the bibliography set-up to make sure that there are no errors due to now undefined or redefined macro calls in the auxiliary files.

In case there was any doubt I should mention that this issue has nothing to do with tikz-feynman. tikz-feynman does not care whether your use biblatex or BibTeX or manual thebibliography to generate your bibliography.