Citations in Latex not working using biber backend and biblatex - latex

I am working on a presentation and for some reason, none of my citations are working. I have created presentations with Latex before and never encountered this problem.
The following is a minimal example which is not working:
\documentclass{beamer}
\usepackage[backend=biber, style=authoryear, citestyle=authoryear]{biblatex}
\setbeamertemplate{footline}[frame number]
\bibliography{literatur.bib}
%\addbibresource{common/literatur.bib}
\begin{document}
\begin{frame}
\cite{test_citation}
\end{frame}
\nocite{*}
\begin{frame}[allowframebreaks=.85]{Bibliography}
\printbibliography
\end{frame}
\end{document}
During compilation, I get the following messages:
This is BibTeX, Version 0.99d (MiKTeX 21.10)
The top-level auxiliary file: document.aux
I found no \citation commands---while reading file document.aux
I found no \bibdata command---while reading file document.aux
I found no \bibstyle command---while reading file document.aux
(There were 3 error messages)
literatur.bib lies on the same level as document.tex and contains the following text:
#article{test_citation,
author="Author, Dummy",
title="Dummy citation",
year="2022"
}
I suspect that something is wrong with my biblatex installation, because even making the problem as simple as possible, the bibliography contains not a single entry in spite of the \nocite{*} command.

Related

Citation undefined on input even though they exist

Hi I'm using Overleaf for my dissertation and this warning started popping up recently:
Citation 'objprogen' on page 1 undefined on input line 8.
This citation is already created as seen below in the 'sources.bib' file:
#article{objprogen,
author={Guo, Wenzhong and Lin, Renjie and Wang, Shiping and Xiong, Neal},
booktitle={2018 9th International Symposium on Parallel Architectures, Algorithms and
Programming (PAAP)},
title={Object Proposal Generation for Unsupervised Object Localization},
year={2018},
volume={},
number={},
pages={235-242},
doi={10.1109/PAAP.2018.00046}}
This is my main.tex file:
\documentclass[a4paper]{article}
\usepackage{blindtext, graphicx}
\usepackage{csquotes}
\usepackage[hidelinks]{hyperref}
\usepackage{url}
\usepackage[style=authoryear-ibid,backend=biber]{biblatex}
\hyphenation{op-tical net-works semi-conduc-tor}
\bibliography{sources.bib}
\begin{document}
\title{Can image recognition systems be successfully integrated with existing VIN databases
irrespective of the vehicle manufacturer}
\author{myname}
\maketitle{}
\input{includes/01-Abstract}
\input{includes/02-Introduction}
\input{includes/03-Literature}
\input{includes/04-Methodology}
\input{includes/05-Findings}
\input{includes/06-Conclusion}
\input{includes/07-Appendix}
\end{document}
I had the same problem and solved it by adding \bibliographystyle{plain} (of course you could in principle use other styles). For me the structure of the tex file is the following
\documentclass[oneside, a4paper, onecolumn, 11pt]{article}
%%some packages%%
\begin{document}
%%% some stuff
\bibliographystyle{plain}
\bibliography{bibfile} %bibfile name without the .bib extension
\end{document}
So contrary to you the \bibliography is also inside the document environment.

Bibtex saying empty bibliography when it is not empty

So I am trying to print my bibliography on my LaTex file and am having trouble. The package I am using is
\usepackage[backend=biber, style=alphabetic, sorting=ynt]{biblatex}
\addbibresource{refs.bib}
At the end of my document (still inside the document section though), I use \printbibliography and am being told "Empty bibliography on line 53" (that is the line that the \printbibliography is on). Inside of my bibliography I have this:
#article{junger1995traveling,
title={The traveling salesman problem},
author={J{\"u}nger, Michael and Reinelt, Gerhard and Rinaldi, Giovanni},
journal={Handbooks in operations research and management science},
volume={7},
pages={225--330},
year={1995},
publisher={Elsevier}
}
Any ideas why my bibliography is not showing? I am using Overleaf btw.

Citation not getting displayed - instead the alias is getting displayed in the pdf

I am trying to use \cite to cite items from bibliography.bib. However, my citations are not working properly.
The environment, code and output are as below:
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath,amsfonts,eurosym,geometry,ulem,graphicx,caption,color,setspace,sectsty,comment,footmisc,caption,pdflscape,subfigure,array,hyperref,booktabs,dcolumn,threeparttable, adjustbox,apacite,dirtytalk,multirow,tabularx,booktabs,longtable,lscape,placeins,tikz}
\usepackage[backend=biber,natlib,style=author-year,citestyle=authoryear]{biblatex}
\usepackage{ulem}
\usepackage{float}
\restylefloat{table}
\usepackage{pgfplots}
\pgfplotsset{width=12cm,compat=1.9}
\usepackage{pst-func}
\psset{unit=2cm}
\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=blue,citecolor=blue,linkcolor=red}
\usepackage[center]{caption}
\usepackage{setspace}
\usepackage{epsfig}
\usepackage{graphics}
\usepackage{lscape}
\usepackage[english]{babel}
\usepackage{color}
\addbibresource{bibfile.bib}
\begin{document}
This is a \cite{sample}.
\end{document}
The cite takes reference from my .bib file, which is in the same folder. Here I have attached a sample citation.
#article{sample,
title={What is the price elasticity of housing demand?},
author={Hanushek, Eric A and Quigley, John M},
journal={The Review of Economics and Statistics},
pages={449--454},
year={1980},
publisher={JSTOR}
}
The output that I am getting looks like
Author Year with year linking to the bibliography section. However, I want it like Author, Year with the entire phrase linking to the bibliography section
Could you please help me with this issue?
Thank You :)
P.S. : I know my environment is not perfect. It has some packages repeated twice. :)
NEVER IGNORE ERROR MESSAGES! After an error, latex only recovers enough to syntax check the rest of the document. There is no point at even looking at what might or might not be valid output while there are still errors!
There are several major problems:
don't load packages multiple times and in particular don't load them multiple times with different options. An error message in the log file will explicitly tell you about the option clash
don't load incompatible package like apacite and biblatex in the same document. An error message in the log file with explicitly tell you that these two packages are not compatible
the biblatex option is called natbib, not natlib. An error message will explicitly tell you that it does not know the option natlib
the biblatex style is called authoryear, not author-year. An explicit error message will tell you that author-year style is not found
... and then there are many other duplicate, unnecessary or obsolete packages. You should clean up your preamble and only load the packages you need. Also hyperref should be loaded after the other packages.
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath,amsfonts,eurosym,geometry,ulem,graphicx,caption,color,setspace,sectsty,comment,footmisc,caption,pdflscape,subfigure,array,
%hyperref,
booktabs,dcolumn,threeparttable, adjustbox,
%apacite,
dirtytalk,multirow,tabularx,booktabs,longtable,
%lscape,
placeins,tikz}
\usepackage[backend=biber,natbib,style=authoryear,citestyle=authoryear]{biblatex}
%\usepackage{ulem}
\usepackage{float}
\restylefloat{table}
\usepackage{pgfplots}
\pgfplotsset{width=12cm,compat=1.9}
\usepackage{pst-func}
\psset{unit=2cm}
%\usepackage{hyperref}
%\usepackage[center]{caption}
%\usepackage{setspace}
%\usepackage{epsfig}
%\usepackage{graphics}
%\usepackage{lscape}
\usepackage[english]{babel}
%\usepackage{color}
\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=blue,citecolor=blue,linkcolor=red}
\begin{filecontents*}[overwrite]{\jobname.bib}
#article{sample,
title={What is the price elasticity of housing demand?},
author={Hanushek, Eric A and Quigley, John M},
journal={The Review of Economics and Statistics},
pages={449--454},
year={1980},
publisher={JSTOR}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
This is a \cite{sample}.
\end{document}

Latex: Can I cite a reference after the bibliography

I'm having trouble with citations after the bibliography (in my appendices) using Bibtex/pdflatex. I'm using the 'puthesis' class - Purdue's class for our theses - which is built on top of the 'report' class. I'm using package 'natbib' with the option 'numbers'. An MWE isn't really feasible, but an example is shown below
\documentclass[english, ne, thesis]{puthesis}
\usepackage[numbers]{natbib}
...
\begin{document}
\chapter{Body Chapter}
Citations work fine here \cite{abc123}
\bibliographystyle{unsrt}
\bibliography{dissertation.bib}
\appendices
\chapter{Appendix Chapter}
Citations don't work here, I get an error that the
"Package natbib Warning: Citation `Crane1991' on page 145 undefined
on input line 4940." \cite{abc1234}
\end{document}
Some obvious things:
The citation does exist in the .bib file.
I'm running pdflatex; bibtex; pdflatex; pdflatex
I get the same error with and without the \appendices line.
Is there a way to cite references in latex after the bibliography?
This problem was caused by a non-UTF8/Latin9 encoded character in my .bib file. After ensuring the correct encoding with
recode utf8..l9 dissertation.bib
the file compiled as expected.

Adding bibliography to appendices in latex

I am writing my thesis and I am using the chapterbib option. While it makes beautiful bibliographies for my chapters, I can't get it to do the same thing for my appendices.
The preamble:
\documentclass[pdftex, 11pt, onecolumn, openany]{report}
\usepackage{amsmath}
\usepackage[pdftex]{graphicx}
\usepackage{appendix}
\usepackage[sectionbib]{chapterbib}
\usepackage{chapterbib}
\begin{document}
...
\include{background}
\include{ATRPcomp}
\include{CCTcomp}
\appendix
\include{AppCCT}
\end{document}
In each of my chapter sections and appendix I have:
\chapter{Compartmentalization in Catalytic Chain Transfer}
...
\bibliography{references}
Does the chapterbib also work for appendices or is there another option that could help?
I assume the package to work also within the appendix. I fact, when you issue the command \appendix the sectioning commands' behavior is the same, except for the numbering (and perhaps the heading).
In the main matter, the chapter command
\chapter{CCTcomp}
gives you
7 CCtcomp
(7 is an example). The commands sequence
\appendix
\chapter{AppCCT}
gives you
A AppCCT
The bibliography shoud work properly.

Resources