1

I have a file citea123.bib containing my bibliography, which I would like to include in my file test123.tex. I cannot get my bibliography to appear and cannot figure out why. I realize this question has been posted before, and I have tried using the suggested solutions (linked below) unsuccessfully. The mini-example below produces a .pdf document that does not contain the bibliography; the document produced is just below.

example document

First, the .bib file.

@article{MainAuthor et al., 
    author = {LastName1, F1.; LastName2, F2.; LastName3, F3.},
    title = {Title of Resource},
    journal = {Some Journal},
    volume = {123},
    number = {4},
    pages = {5-6},
    year = {2018},
    month = {01},
    doi = {https://doi.org/somenumbers}
}

Next, the .tex file. Below is the preamble.

\documentclass{article}

\usepackage{multicol,caption}
\usepackage{geometry}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{comment}
\usepackage{csquotes}
\usepackage[
    backend = biber,
    style = apa,
    ]{biblatex}
\addbibresource{citea123.bib}

\usepackage{amsmath}
\usepackage{gensymb}

\usepackage{graphicx}
\graphicspath{{"/Users/.../"}}

%% DEFINE MACRO -- FIGURE
\newenvironment{Figure}
  {\par\medskip\noindent\minipage{\linewidth}}
  {\endminipage\par\medskip}

\title{This Is My Document Title}
\author{LastName1, F1.; LastName2, F2.; LastName3, F3.}

Now the main part of the .tex file.

\begin{document}
\maketitle

\begin{abstract}
My abstract goes here. Bla bla bla.
\end{abstract}

\begin{multicols}{2}
\section{Introduction}

\begin{itemize}
    \item Point A
    \item Point B
    \item Point C
\end{itemize}

The rest of this paper is organized as follows. Bla bla bla.

\end{multicols}

\section{Data} 

As seen in \cite{MainAuthor et al.}, our data looks like bla bla bla.

\section{References}

%\printbibliography

\printbibliography[
heading=bibintoc,
title={Bibliography}
]

%\bibliography{citations}
%\bibliography{citations.bib}
%\bibliographystyle{apacite}

\end{document}

I am not sure what my error is and have tried many approaches without any luck. I've also configured my TexMaker settings, as suggested by answers in this post and this post and this post, as shown below.

example settings config p1

example settings config p2

I am using Texmaker 5.0.2 (compiled with Qt 5.9.1) on MacOS High Sierra version 10.13.6.

  • 3
    The entry key can't contain spaces. So instead of @article{MainAuthor et al., and \cite{MainAuthor et al.} you should say@article{mainauthor, and \cite{mainauthor}. Note also that names must be separated with and regardless of the desired output, so author = {LastName1, F1.; LastName2, F2.; LastName3, F3.}, should be author = {LastName1, F1. and LastName2, F2. and LastName3, F3.},, see https://tex.stackexchange.com/q/36396/35864. Fix these two issues, delete all temporary files (.aux, .bbl, .bcf, ...) and recompile with LaTeX, Biber, LaTeX, LaTeX. – moewe Jun 10 '19 at 11:43
  • Thanks. I tried changing it to MainAuthorEtAl, but it still does not work. I also get the error LaTeX Warning: Citation 'MainAuthorEtAl on page 1 undefined on input line 65.LaTeX Warning: Empty bibliography on input line 71.` –  Jun 10 '19 at 11:47
  • 2
    You need to change this in both the .bib and the .tex file. You also need to change the ; to and. Since old data might live on in the temporary files you should delete all auxiliary files and recompile from scratch. If even after LaTeX, Biber, LaTeX, LaTeX the issue remains, post the complete .blg and the relevant bits of the .log file here, please. – moewe Jun 10 '19 at 11:49
  • Relevant link for the space https://tex.stackexchange.com/q/224674/35864, https://tex.stackexchange.com/q/408530/35864, https://tex.stackexchange.com/q/96454/35864 – moewe Jun 10 '19 at 12:25
  • This solved my problem. Thank you! –  Jun 11 '19 at 02:51
  • Although this solves my bibliography issue, it creates an issue with images where there was none before (I think because PDF LaTeX is not used to quick-build). I have used the solution proposed here. My images were .png files, though I converted them to .eps (via PIL in python) and tried on these too. Everything compiles, and the extra space is created in the document to accommodate for the image, but there is a blank space where the image should appear. Is there a way to resolve this? –  Jun 11 '19 at 03:28
  • Neither of the two things I suggested should have any influence on image inclusion. pdflatex does not include .eps images directly, you would have to run latex (which produces a .dvi). How did you compile before you changed things for Biber? – moewe Jun 11 '19 at 04:55
  • I tried using the default option, I believe it was biblatex. –  Jun 12 '19 at 02:57
  • Sorry, I can't quite follow. What default options? What did biblatex do? I can assure you, though, that changing the two things I mentioned in the comments above will not impact your (or rather, TeX's) ability to include any kind of graphic files. If you are having trouble with something unrelated to biblatex I suggest you open a new question complete with an MWE and explain what you are trying to do. If you changed anything else than the two points mentioned in my comments, that might be valuable info as well. – moewe Jun 12 '19 at 05:05
  • Any news here? It seems that the answerable part of the question was answered. – moewe Jun 20 '19 at 05:03
  • I compiled from the command line instead of using the presets in TexMaker, it works that way. If an answer is posted as a non-comment, I can accept it. –  Jun 20 '19 at 05:06

1 Answers1

1

There are two issues here.

  1. Entry keys can't contain spaces. @article{MainAuthor et al., won't work, you need something like

    @article{mainauthor,
    

    instead. See also Can I have a reference with spacing using bibtex? Like \cite{Author Year}. More restrictions for the entry keys are discussed at Using BibTeX keys containing parentheses with Biber, What characters are allowed to use as delimiters for BibTeX keys?, What is the difference between a biblatex literal and string?.

  2. Regardless of the desired output multiple authors must always be separated with the keyword and. So author = {LastName1, F1.; LastName2, F2.; LastName3, F3.}, should be

    author = {LastName1, F1. and LastName2, F2. and LastName3, F3.},
    

    See How to properly write multiple authors in bibtex file?. If you input the names not with and but separate them with commas or semicolons Biber may complain or crash - or just parse the name incorrectly.

With those two issues fixed the code produces a citation and bibliography entry as expected.

moewe
  • 175,683