This is my first post, and I'm relatively new using LaTeX, so I apologize for any errors I might be doing.
I know bibliography generation is usually an issue for noobs with LaTeX, and I've read a lot of posts on the issue, but despite that I can't see why I'm failing to generate my bibliography.
I'm using TexMaker on Linux and KBibTeX to do my .bib files. I have all files related to what I'm writing on the same folder. By compiling the .tex file, I now have in the folder:
.log
.aux
.bbl
.blg
.dvi
.log
besides the .tex and .bib files
My document preamble looks like this:
Code: Select all
\documentclass[10pt]{article}
\usepackage{url,graphicx,tabularx,array,geometry,amsmath,amssymb}
\usepackage[english]{babel}
% Layout:
\setlength{\parskip}{1ex} %--skip lines between paragraphs
\setlength{\parindent}{0pt} %--don't indent paragraphs
% Commands for header:
\renewcommand{\title}[1]{\textbf{#1}\\}
\renewcommand{\line}{\begin{tabularx}{\textwidth}{X>{\raggedleft}X}\hline\\\end{tabularx}\\[-0.5cm]}
\newcommand{\leftright}[2]{\begin{tabularx}{\textwidth}{X>{\raggedleft}X}#1%
& #2\\\end{tabularx}\\[-0.5cm]}
\begin{document}
\bibliography{mybibfile}
The problem is that when compiling I get errors saying "undefined control sequence" for every \cite{keyword} I use. An example is:
Code: Select all
! Undefined control sequence.
\b@shivde2001role ...activesfalse \citeauthoryear
{Shivde\ {} Anderson}{Shiv...
l.74 ...y empirical data. In \cite{shivde2001role}
, experiment 1 showed a $5...
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
What's weird is that sometimes it doesn't give the errors, compiles but then either the bibliography generated has all the wrong names, repeated last names, etc. Or the bibliography is not seen in the PDF, or it it seen but the references are all with question marks, etc. That's why I say it behaves randomly.
I have all the tex-live packages installed, so I don't think I'm missing something. I also tried using plain bibliography style, in case the apacite package was failing, bit it's all the same.
Please, I would appreciate some help in this.
Thanks in advance.