Citation undefined on input even though they exist - latex

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.

Related

Unable to make acronyms in latex

Hi I am trying to get acronyms in my document but I am continuously failing in doing that.
\documentclass{scrbook}
\usepackage[acronym]{glossaries}
\makeglossaries
\begin{document}
\mainmatter
\printglossary[type=\acronymtype]
\include{ch1}
end{document}
and my acronym code is in the chapter file
\chapter{ch1}
\acrfull{WLAN} is used as a trial for my example and problem
\newacronym{wlan}{WLAN}{Wireless Local Area Network}
You're defining the acronym wlan, but you are using the acronym WLAN. Decide on which of the two you want and the be consistent:
\documentclass{scrbook}
\usepackage[acronym]{glossaries}
\makeglossaries
\begin{document}
\mainmatter
\printglossary[type=\acronymtype]
\chapter{ch1}
\acrfull{WLAN} is used as a trial for my example and problem
\newacronym{WLAN}{WLAN}{Wireless Local Area Network}
\end{document}

Missing = inserted for \ifnum

I am using iopart template, and I do not know why get this error :
Missing = inserted for \ifnum. \begin
Missing number, treated as zero. \begin
I really appreciate any help
\documentclass[10pt]{iopart}
%\newcommand{\gguide}{{\it Preparing graphics for IOP Publishing journals}}
%Uncomment next line if AMS fonts required
%\usepackage{iopams}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{nicefrac}
\expandafter\let\csname equation*\endcsname\relax
\expandafter\let\csname endequation*\endcsname\relax
\usepackage{amsmath,mathtools}
\DeclareMathOperator{\cotinv}{cot\,inverse}
\usepackage{amssymb}
\let\amscases\cases
\makeatletter
\def\cases{\#ifnextchar\bgroup\plaincases\amscases}
\def\plaincases#1{\begin{cases*}#1\end{cases*}}
\makeatother
\usepackage{multirow}
\usepackage{subfloat}
\usepackage{subfig}
\usepackage{gensymb}
%\newcommand{\acot}{\cot^{-1}}
\begin{document}
\title[]{}
\author{}
\author{}
\address{Department of}
\vspace{10pt}
\begin{indented}
\item[]November 2022
\end{indented}
\begin{abstract}
lll
\end{abstract}
%
% Uncomment for keywords
\vspace{2pc}
\noindent{\it Keywords}: electronics
%
% Uncomment for Submitted to journal title message
%\submitto{\JPA}
%
% Uncomment if a separate title page is required
\maketitle
%
% For two-column output uncomment the next line and choose [10pt] rather than [12pt] in the \documentclass declaration
\ioptwocol
%
\section{Introduction}\label{sec:introduction}
\end{document}```
I tried to recreate this instance. It first asked for the missing iopart.cls documentclass. I could get that from a GitHub repository belonging to Tianjin University named "etgroup". You can simply find it by searching "iop latex template" in Github. After the second compilation, it asked for a class dependency named iopart10.clo(it's available in the same repository).
Finally, after the third compilation, I could get a PDF output(Please see the figure attached).
Solution: If you are using a local LaTeX IDE/Studio, I recommend updating the packages you are using. Sometimes there are conflicts between some packages but they usually resolve quickly by releasing an update and you might see that there was nothing wrong with your commands.
Alternatively, you may try using an online LaTeX editor. They always have the last version of the most common packages and are equipped with multiple LaTeX render engine types.

Use Biblatex to get an overview of the keywords from my sources

Hi I'm using LaTeX to write a literature review and BibLaTeX to print my sources and bibliography.
I would like to get an overview of all the keywords used in the articles I have gathered so far.
Since I have them all in a .bib file I figured that there probably is some easy way to get all the keywords from there that utilises BibLaTeX and the BibTeX-format of the file with the info.
From what I can gather BibLaTeX has the support for using keywords to sort the bibliography, or include/exclude certain sources based on keywords, but I can't find if or how I can print other information from the .bib than the full source. I've found \printfield in the documentation but it's not recognised when I use it in my document, even though the \textcite and the \printbibliography works fine so I'm guessing I'm using it wrong. Here's how I've tried to use it:
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber]{biblatex}
\addbibresource{sample.bib}
\title{Test}
\author{Me}
\begin{document}
\maketitle
\section*{Citation examples}
\parencite{Smith:2012qr}.
\printfield{keywords}
\printbibliography
\end{document}
I hope my question is clear enough.
Thank you.
Based on this question https://tex.stackexchange.com/questions/332292/listing-indexing-and-linking-keywords-in-biblatex you could use one of the packages for index creation, e.g. imakeidx:
\documentclass{article}
\begin{filecontents*}[overwrite]{\jobname.bib}
#article{Padial2010,
title={The Integrative Future Of Taxonomy},
author={Padial, J.M. and Miralles, A. and la Riva, I.D. and Vences, M.},
journal={Frontiers in Zoology},
year={2010},
volume={7},
number={16},
pages={1--14},
note={Cited by 4},
abstract={Text},
publisher={Some Publishing},
doi={10.1186/1742-9994-7-16},
issn={1742-9994},
file={./2004_Jensen_Homecoming.pdf},
keywords={biology, taxonomy},
}
#article{Padissal2010,
title={The Integrative Future Of Taxonomy},
author={Padial, J.M. and Miralles, A. and la Riva, I.D. and Vences, M.},
journal={Frontiers in Zoology},
year={2010},
volume={7},
number={16},
pages={1--14},
note={Cited by 4},
abstract={Text},
publisher={Some Publishing},
doi={10.1186/1742-9994-7-16},
issn={1742-9994},
file={./2004_Jensen_Homecoming.pdf},
keywords={math, taxonomy},
}
\end{filecontents*}
\usepackage{biblatex}
\addbibresource{\jobname.bib}
\usepackage{imakeidx}
\makeindex[name=keywords, title=List of Keywords]
\DeclareIndexFieldFormat{keywords}{\forcsvfield{\index[keywords]}{keywords}}
\AtEveryBibitem{\indexfield{keywords}}
\begin{document}
\nocite{*}
\printbibliography
\printindex[keywords]
\end{document}

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}

Citing mathoverflow answers using \bibitem(without using bibtex)

Is there a way to cite mathoverflow answers using the following :
\begin{thebibliography}
\bibitem ....the mathoverflow citation
\end{thebibliography}
I did the following :
\documentclass[11pt]{amsart}
\setlength{\textheight}{23cm}
\setlength{\textwidth}{16cm}
\setlength{\topmargin}{-0.8cm}
\setlength{\parskip}{0.3\baselineskip}
\hoffset=-1.4cm
\usepackage{pifont}
\usepackage{amsmath,amscd,amssymb}
\usepackage{hyperref}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{conjecture}[subsection]{Conjecture}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}
\numberwithin{equation}{section}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{corollary}[theorem]{Corollary}
\renewcommand{\thefootnote}{\arabic{footnote}}
\input xy
\xyoption{all}
\begin{document}
some text \cite{MO1}
\begin{thebibliography}{1}
\bibitem{MO1} gowers (\url{https://mathoverflow.net/users/1459/gowers}), Examples of common false beliefs in mathematics, URL (version: 2020-09-03): \url{https://mathoverflow.net/q/23478}
\end{thebibliography}
\end{document}
I know that there are ways to do it using bibtex and creating a separate .bib file. But I was thinking whether we could do it just using \bibitem?
Any help from anyone is welcome.
You could copy the rendered citation from the top of the cite popup:
With some tiny modifications, like wrapping the urls into suitable macros, you can directly use this in your bibliography:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\begin{thebibliography}{1}
\bibitem{gowers} gowers (\url{https://mathoverflow.net/users/1459/gowers}), Examples of common false beliefs in mathematics, URL (version: 2020-09-03): \url{https://mathoverflow.net/q/23478}
\end{thebibliography}
\end{document}

Resources