I am new to Latex and having trouble with undefined citations. I am using Texmaker on Ubuntu.
I have tried all of the suggestions so far, but the same problem persists.
This is most my main .tex-file that I use for quick build:
\documentclass[12pt]{book}
\usepackage{a4wide}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage[english, ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[bookmarks]{hyperref}
\usepackage{braket}
\usepackage{mathrsfs}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{natbib}
\pagestyle{fancyplain}
\renewcommand{\chaptermark}[1]%
{\markboth{\thechapter.\ #1}{}}
\renewcommand{\sectionmark}[1]%
{\markright{\thesection\ #1}}
\lhead[\fancyplain{}{\bfseries\thepage}]%
{\fancyplain{}{\bfseries\rightmark}}
\rhead[\fancyplain{}{\bfseries\leftmark}]%
{\fancyplain{}{\bfseries\thepage}}
\cfoot{}
\hypersetup {
pdfpagemode = {UseNone}
}
\begin{document}
\frontmatter
\include{pages/deckblatt}
\include{pages/titleblatt}
\include{pages/zweite_seite}
\tableofcontents
\markboth{Inhaltsverzeichnis}{Inhaltsverzeichnis}
\listoffigures
\markboth{Abbildungsverzeichnis}{Abbildungsverzeichnis}
\listoftables
\markboth{Tabellenverzeichnis}{Tabellenverzeichnis}
\cleardoublepage
\markboth{Zusammenfassung}{Zusammenfassung}
\include{pages/zusammenfassung}
\mainmatter\setcounter{page}{1}
\include{chapter/kap_01}
\include{chapter/kap_02}
%\include{chapter/kap_03}
%\include{chapter/kap_04} usw.
\include{pages/anhang}
\backmatter
\bibliographystyle{unsrtnat}
\bibliography{literatur}
\markboth{}{}
\include{pages/danksagung}
\end{document}
And this is the literatur.bib file in the same folder:
@Article{EPR,
author = {A. Einstein and B. Podolsky and N. Rosen},
title = {Can quantum-mechanical description of physical reality be considered complete?},
journal = {Physical Review},
publisher = {American Physical Society},
year = {1935},
volume = {47},
pages = {777-780}
}
@Article{Aspect,
author = {A. Aspect and J. Dalibard and G. Roger},
title = {Experimental Test of Bell's Inequalities Using Time-Varying Analyzers},
journal = {Physical Review Letters},
publisher = {American Physical Society},
year = {1982},
volume = {49},
number = {25},
pages = {1804-1807}
}
@Article{Bell,
author = {J. S. Bell},
title = {On the Einstein Podolsky Rosen Paradox},
journal = {Physics},
publisher = {Physics Publishing Co.},
year = {1964},
volume = {1},
number = {3},
pages = {195-200}
}
@Article{Stern-Gerlach,
author = {W. Gerlach and O. Stern},
title = {Der experimentelle Nachweis der Richtungsquantelung im Magnetfeld},
journal = {Zeitschrift für Physik},
band = {9},
year = {1922},
pages = {349-352}
}
@Article{Bertlmann,
author = {J. S. Bell},
title = {Bertlmann's socks and the nature of reality},
journal = {Journal de Physique Colloques},
year = {1981},
volume = {42},
number = {C2},
pages = {41-62}
}
@Article{Bohm,
author = {D. Bohm and H. Aharonov},
title = {Discussion of experimental proof of the paradox of Einstein, Rosen, and Podolsky},
journal = {Physical Review},
publisher = {American Physical Society},
year = {1957},
volume = {108},
number = {4},
pages = {1070-1076}
}
@Article{Innsbruck,
author = {G. Weihs and T. Jennewein and C. Simon and H. Weinfurter and A. Zeilinger},
title = {Violation of Bell’s inequality under strict Einstein locality conditions},
journal = {Physical Review Letters},
publisher = {American Physical Society},
year = {1998},
volume = {81},
number = {23},
pages = {5039-5043}
}
@Article{CHSH,
author = {J. Clauser and M. Horne and A. Shimony and R. Holt},
title = {Proposed experiment to test local hidden-variables theories},
journal = {Physical Review Letters},
publisher = {American Physical Society},
year = {1969},
volume = {23},
number = {15},
pages = {880-884}
}
@Article{Loopholefreebelltest,
author = {B. Hensen et al.},
title = {Loophole-free Bell test using electron spins in diamond: second experiment and additional analysis},
journal = {Scientific Reports},
publisher = {Nature},
year = {2016},
volume = {6},
number = {30289},
pages = {1-11}
}
@Book{Ballentine,
author = {L. Ballentine},
booktitle = {Quantum Mechanics: A Modern Development},
publisher = {World Scientific Publishing Company},
edition = {2nd revised and edited edition},
year = {2014}
}
@Book{Sakurai,
author = {J. Sakurai and J. Napolitano},
booktitle = {Modern Quantum Mechanics},
publisher = {Pearson Education (US)},
edition = {2nd edition},
year = {2010}
}
@incollection{GHZ,
author = {D. Greenberger and M. Horne and A. Zeilinger},
title = {Bell’s Theorem, Quantum Theory and Conceptions of the Universe},
series = {Fundamental Theories of Physics},
volume = {37},
publisher = {Springer},
year = {1989},
pages = {69-72}
}
@Book{Cohen-Tannoudji-1,
author = {C. Cohen-Tannoudji and B. Diu and F. Laloë and J. Streubel},
booktitle = {Quantenmechanik},
volume = {1},
publisher = {De Gruyter Studium},
edition = {5. Auflage},
year = {2019}
}
@Book{Cohen-Tannoudji-2,
author = {C. Cohen-Tannoudji and B. Diu and F. Lalo{\"e} and J. Streubel},
booktitle = {Quantenmechanik},
volume = {2},
publisher = {De Gruyter Studium},
edition = {5. Auflage},
year = {2019}
}
@Book{Bub,
author = {J. Bub},
booktitle = {Interpreting the Quantum World},
publisher = {Cambridge University Press},
edition = {1st revised edition},
year = {1999}
}
When I want to insert the citation in the appropriate place in kap_01.tex, I start typing \cit..., and I am already suggested \citep{According names in the .bib file}, which makes me think that the .bib file is in the right place and recognized, which seems to be the reason for most similar issues. There is some peculiar behavior here though: Sometimes the bib entries are not suggested and then, without me being aware of having made any changes, after a restart of the program, the suggestions are there again...
When I go "quick build", it reports undefined citations wherever I have used them and they are shown as question marks in the pdf.
Unfortunately, the log is to long to attach here, instead I've uploaded the file here: https://easyupload.io/9jhap8
The only .blg file I could find was last modified in Ocotber, so that can't be it. Back then I hadn't edited the bib-file either.
.bibfile that must be fixed, but I think that problem is unlikely to be the cause of the issue you ask about. Authors must be separated withandand not with, and. A comma may only be used to separate parts of a single name. The correct author field would beauthor = {J. Sakurai and J. Napolitano},. I would also remove the spaces after the opening and before the closing brace. A@bookdoes not have abooktitle, it has atitle. And the edition should go into theeditionfield and not thepublisherfield. – moewe Dec 29 '19 at 07:51jkthesis.bstwas not found on my machine. A bit of googling suggests the file is available at https://ctan.org/tex-archive/macros/latex/contrib/jkthesis but it does not appear to be in either MikTeX or TeX live, so it has to be downloaded manually. Secondly, it turns out the wrong comma I mentioned above does cause an error. It must be fixed. Thirdly,jkthesis.bstis quite old and not fully compatible withnatbib, in particular not with author-year citations and\citet. ... – moewe Dec 29 '19 at 07:58jkthesis, better pick another style. (For exampleunsrtnatorplainnat.) – moewe Dec 29 '19 at 07:58I've switched from jkthesis to unsrtnat as you can see. But I'm pretty sure the package is included on my machine, otherwise the error would be something like 'undefined references', right?
Thanks for your help though, guys :)
– Markus Gratis Dec 29 '19 at 12:57, andwhen they give the bibliography manually inthebibliography. All examples for.bibentries correctly only useandwithout comma.booktitlemight be listed among the common fields on that page, but it is not commonly recognised for@bookentries. It would help if you could upload the.blgfile (the log file of the BIbTeX run, on Windows machines.blgfiles may be classified as performance monitor files, but they are simple text files that can be opened with any text editor). Ifjkthesisis not found you get an error in the.blgfile. – moewe Dec 29 '19 at 13:06.bibentries and displays them in a selection dialogue is largely independent of whether or not LaTeX and BibTeX can find the relevant.bibentry. Your editor uses vastly different means to find and read the.bibfile than LaTeX and BibTeX. – moewe Dec 29 '19 at 13:07\includecommands that reference files I don't have and adding a\nocite{*}I end up with a document that produces a bibliography. The.blgfile containsWarning--empty title in Ballentineand a few similar complaints, but that only causes weird output (the title is missing) and does not stop the entry from appearing in the bibliography. So in theory, things can work. We need to see the.logand.blgfiles. – moewe Dec 29 '19 at 13:17booktitleis ignored for@bookentries, the colon in Ballentine is doubly no problem. If you don't have a current.blgfile that sort of suggests you didn't actually run BibTeX on your file. See https://tex.stackexchange.com/q/63852/35864 for explanations why that is necessary. – moewe Dec 29 '19 at 13:54