2

I am working with biblatex in overleaf and here is a minimal (not) working version of what I do:

\documentclass[12pt,a4paper]{report}
\usepackage{verbatim}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{import}
\usepackage{inputenc}


%bibliography stuff
\usepackage[
backend=biber,
style=authoryear,
%style=nature,
sorting=nyt
]{biblatex}
%\usepackage{biblatex}

\addbibresource{thesisbibliography.bib}
%\bibliography{thesisbibliography}
%\bibliographystyle{ieeetr}


\begin{document}

\pagenumbering{Roman}
\parindent=0pt

\tableofcontents %{\protect\newpage}

\pagenumbering{arabic}


\chapter{Astro Basics}
Cool stuff was found by Johannes Kepler \citep{Kepler} \cite{KeplerCopernic}, and Isaac Newton \cite{Newton1687}, in the 16th century. \\

...

\newpage
%\begin{thebibliography}{x}
%\bibliography{bibliography}

%\addcontentsline{toc}{chapter}{References}
\printbibliography[
heading=bibintoc,
title={References}
]
%\bibliography{thesisbibliography}
%\bibliographystyle{ieeetr}


%\end{normalsize}
\end{document}


And this is the bib file:

@Book{Kepler,
  author    = "Johannes {Kepler} and Tycho {Brahe} and {Rudolph II}",
  title     = "{Astronomia nova aitiologetos}",
  %publisher = "",
  year      = "1609",
  %volume    = "",
  %number    = "",
  %series    = "",
  %address   = "",
  %edition   = "",
  %month     = "",
  %note      = "",
  %annote    = ""
  doi       ={10.5479/sil.126675.39088002685477}
}

@Book{KeplerCopernic,
  author    = "Johannes {Kepler}",
  title     = "{Epitome Astronomiae Copernicanae}",
  %publisher = "",
  year      = "1618-1621",
  %volume    = "",
  %number    = "",
  %series    = "",
  %address   = "",
  %edition   = "",
  %month     = "",
  %note      = "",
  %annote    = ""
}



@Book{Newton1687,
  author    = "Isaac Newton",
  title     = "Philosophiae Naturalis Principia Mathematica.",
  publisher = "Londini, Jussu Societatis Regiæ ac Typis Josephi Streater. Prostat apud plures Bibliopolas.",
  year      = "1687",

  note      = "Retrieved from the Library of Congress \url{https://www.loc.gov/item/28020872/}"
}

What I get in the text as a citation is my keyword, not the actual citation style (no matter what style I choose). Also, the bibliography is not printed in the end and does not even appear in the table of context nor just as a title of the section in the text. So I am obviously doing something wrong.

I do not get error messages, I can produce a pdf file. There are warnings like "citation ... is undefined" or "empty bibliography input" which did not help me understand how to solve it yet.

I already searched for solutions a lot and tried out the examples of others, but could not find a solution. I could imagine that the issue is something very basic that I can not think of and is so basic that is not written anywhere, but maybe I am wrong and it is a more complex issue. In any way I would be deeply grateful for any ideas and hints that could help me fixing the issue. Thank you in advance!

Keks
  • 37
  • 8

1 Answers1

3

\citep is not a native biblatex macro. If you want to use it, you need to use the natbib package option when loading the biblatex package:

\documentclass[12pt,a4paper]{report}
\usepackage{verbatim}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{import}
\usepackage{inputenc}


%bibliography stuff
\usepackage[
backend=biber,
style=authoryear,
%style=nature,
sorting=nyt,
natbib
]{biblatex}
%\usepackage{biblatex}

\begin{filecontents*}[overwrite]{\jobname.bib}
@Book{Kepler,
  author    = "Johannes {Kepler} and Tycho {Brahe} and {Rudolph II}",
  title     = "{Astronomia nova aitiologetos}",
  %publisher = "",
  year      = "1609",
  %volume    = "",
  %number    = "",
  %series    = "",
  %address   = "",
  %edition   = "",
  %month     = "",
  %note      = "",
  %annote    = ""
  doi       ={10.5479/sil.126675.39088002685477}
}

@Book{KeplerCopernic,
  author    = "Johannes {Kepler}",
  title     = "{Epitome Astronomiae Copernicanae}",
  %publisher = "",
  year      = "1618-1621",
  %volume    = "",
  %number    = "",
  %series    = "",
  %address   = "",
  %edition   = "",
  %month     = "",
  %note      = "",
  %annote    = ""
}



@Book{Newton1687,
  author    = "Isaac Newton",
  title     = "Philosophiae Naturalis Principia Mathematica.",
  publisher = "Londini, Jussu Societatis Regiæ ac Typis Josephi Streater. Prostat apud plures Bibliopolas.",
  year      = "1687",

  note      = "Retrieved from the Library of Congress \url{https://www.loc.gov/item/28020872/}"
}


\end{filecontents*}

\addbibresource{\jobname.bib}
%\bibliography{thesisbibliography}
%\bibliographystyle{ieeetr}


\begin{document}

\pagenumbering{Roman}
\parindent=0pt

\tableofcontents %{\protect\newpage}

\pagenumbering{arabic}


\chapter{Astro Basics}
Cool stuff was found by Johannes Kepler \citep{Kepler} \cite{KeplerCopernic}, and Isaac Newton \cite{Newton1687}, in the 16th century. \\

...

\newpage
%\begin{thebibliography}{x}
%\bibliography{bibliography}

%\addcontentsline{toc}{chapter}{References}
\printbibliography[
heading=bibintoc,
title={References}
]
%\bibliography{thesisbibliography}
%\bibliographystyle{ieeetr}


%\end{normalsize}
\end{document}
  • Thank you. I just tried this out (still using the extra bib file, but with the natbib part added) both like in your code here as well as with also \usepackage{natbib}. Unfortunately, this does not solve the problem either. If that matters: I also tried out other versions than just \citep, such as \cite etc. – Keks Dec 21 '22 at 13:00
  • Don't use `\usepackage{natbib}` with biblatex!!!!!!!!!!!! Can you show your .log file? – samcarter_is_at_topanswers.xyz Dec 21 '22 at 13:03
  • @Keks Works also fine on overleaf https://www.overleaf.com/read/tcxbgfbqcqnr – samcarter_is_at_topanswers.xyz Dec 21 '22 at 13:08
  • Thank you for the hint - indeed this minimal example works for me now, too. The actual file still has the issues, but I will first try to figure out when they start now and maybe provide a better minimal example. The current log refers to names that are not included in the minimal example. I will give an update later! – Keks Dec 21 '22 at 13:17