Trying to create a bibliography and use in-text citations in LaTex apa7 using TexMaker

92 views Asked by At

I'm trying to write a research article in LaTex that follows APA7. There's some problem with the .bib file, where something is going wrong with the source. I tried stripping down my article to the basics, then I can build around it later. I am using TexMaker.

Here is what I have for my .tex file: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[12pt, donotrepeattitle, apacite]{apa7}
\usepackage[american]{babel}

% Title and author information
\title{Blahty, Blahty, Blah, Blah}
\date{} %do not delete this, it suppresses insertion of the date
\shorttitle{Blahty, Blah}
\author{
Blahington B. Blahblah
}
\affiliation{Blah Blah}
\abstract{Abstract here. Blahty, Blahty, Blah.}

\keywords{Blah, Blahhh, Blahty, Blahblah}

\begin{document}

\maketitle

\section{Introduction}
Reference something \cite{tinto2006research}.

\section{References}
\bibliographystyle{apacite}

\bibliography{./reffile.bib}

\end{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Here is my .bib file:

@article{tinto2006research,
  title={Research and practice of student retention: What next?},
  author={Tinto, Vincent},
  journal={Journal of College Student Retention: Research, Theory \& Practice},
  volume={8},
  number={1},
  pages={1--19},
  year={2006},
  publisher={SAGE Publications Sage CA: Los Angeles, CA}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Just a simple one article to start off. What happens depends on a lot of things, including my Quick Build setup and what I am referencing.

When I compile as-is, I get an Undefined control sequence error. When I remove the reference, it compiles perfectly, sometimes has a bibliography sometimes does not. When I replace the in-text citation with a fake reference, \cite{asdf}, it actually compiles with (?, ?) where the in-text citation is.

I am new to LaTex. I am using TexMaker and my Quick-build is the second option: PdfLaTeX + Bib(la)tex + PdfLaTeX(x2) + View Pdf I tried using the Wizard to set it up manually as well, but it did not change anything.

I've also tried deleting all files except the .tex and .bib file to recompile, which does nothing. I tried using another LaTeX file that I got to work in the past, replacing the text and citations with the new file, but now that one isn't working either! I'm thinking I might have accidentally messed with a setting?

All the software is up to date. The .tex and .bib file are in the same folder. Please let me know what I'm doing wrong or if you need to know anything else.

Any help is appreciated.

0

There are 0 answers