0
\documentclass[12pt]{book}

\usepackage{times}

\usepackage{emptypage}

\usepackage[style=chicago-authordate, backend=biber]{biblatex}


\addbibresource{library.bib}

\begin{document}

\fontsize{12pt}{14pt}\selectfont

\tableofcontents

\chapter{Introduction}


This is the introduction of your book. Write your content here.
\cite{chatterjee_museums_2016}

\printbibliography

\clearpage


\end{document}

What am I doing wrong with this code, can someone point out.

The BibTex data of "ackerman_museums_2016" is as follows and it has no duplicates. The the .bib file of the document is saved where the main .tex file is saved. I have been at this for days but cannot figure where I am going wrong.

@book{chatterjee_museums_2016,
    edition = {1},
    title = {Museums, {Health} and {Well}-{Being}},
    isbn = {978-1-315-59654-9},
    url = {https://www.taylorfrancis.com/books/9781315596549},
    publisher = {Routledge},
    author = {Chatterjee, Helen},
    year = {2016},
}
JamesT
  • 3,169
  • What exactly is the issue? The code compiles for me – JamesT Feb 10 '23 at 17:28
  • 2
    have you run biber after pdflatex, then run pdflatex twice more – David Carlisle Feb 10 '23 at 17:30
  • @JamesT - are you also able to cite the literature? – Aditya Chakravarthy Feb 10 '23 at 17:47
  • @DavidCarlisle How do I do it. – Aditya Chakravarthy Feb 10 '23 at 17:48
  • 3
    if your file is file.tex then type pdflatex file then biber file then pdflatex file then pdflatex file . If you get your editor to run commands for you, it probably has a menu item somewhere – David Carlisle Feb 10 '23 at 17:50
  • 1
    As I wrote under your other question (https://tex.stackexchange.com/q/674492/35864) you need to run LaTeX, Biber, LaTeX, LaTeX (in this case "LaTeX" is most likely pdflatex) on your file. See https://tex.stackexchange.com/q/63852/35864. If you need help with your editor, see https://tex.stackexchange.com/q/154751/35864. – moewe Feb 11 '23 at 07:29
  • 2
    It would be much more useful to update your earlier questions and respond to comments than to just open a new question more or less ignoring earlier hints. – moewe Feb 11 '23 at 07:29

1 Answers1

2

(I've created this posting mainly so that the query can be considered to have received a "complete" answer.)

It would appear that you haven't run biber in between LaTeX runs. In the case the biblatex package is in use, a full compilation cycle is pdflatex - biber - pdflatex. (If you use LuaLaTeX or XeLaTeX instead of pdfLaTeX, make the appropriate substitution.)

I hope I don't sound needlessly harsh, but your code contains a number of serious weaknesses which you must address.

  • In terms of substance, the bib entry you've shown is (a) missing an author (Guy Noble) and (b) lists an incorrect publication year (you write 2016, but it's actually 2013). You really, really need to correct such errors of substance. I hope you agree.

  • I'd also get rid of code clutter caused by redundant items such as curly braces, { and }. E.g., I'd replace title = {Museums, {Health} and {Well}-{Being}}, with title = {Museums, Health and Well-Being},. Removing code clutter is not only aesthetically satisfying, but it also makes debugging a lot easier.

  • Finally, in terms of LaTeX coding efficiency, don't load obsolete packages (such as times), do load some very useful packages (such as xurl), and do remove unnecessary/pointless instructions (such as \fontsize{12pt}{14pt}\selectfont and the final \clearpage).

enter image description here

\documentclass[12pt]{book}

%% Create 'library.bib' on the fly": \begin{filecontents}[overwrite]{library.bib} @book{chatterjee_museums_2016, edition = {1}, title = {Museums, Health and Well-Being}, isbn = {978-1-315-59654-9}, url = {https://www.taylorfrancis.com/books/9781315596549}, publisher = {Routledge}, author = {Chatterjee, Helen and Noble, Guy}, year = {2013}, } \end{filecontents}

%%\usepackage{times} % <-- 'times' package is obsolete \usepackage{newtxtext,newtxmath}

\usepackage{emptypage}

\usepackage[style=chicago-authordate]{biblatex} % 'biber' is the default backend nowadays \addbibresource{library.bib}

\usepackage{xurl} % allow linebreaks in URLs everywhere \urlstyle{same}

\begin{document}

%%\fontsize{12pt}{14pt}\selectfont % <-- unnecessary

\frontmatter %% <-- new \tableofcontents

\mainmatter %% <-- new \chapter{Introduction}

A citation call-out: \cite{chatterjee_museums_2016}.

\printbibliography

%%\clearpage % <-- unnecessary

\end{document}

Mico
  • 506,678