BibTeX, biblatex and biberGeneration of Bibliography behaves randomly

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
radissthor
Posts: 2
Joined: Thu Nov 17, 2011 10:41 am

Generation of Bibliography behaves randomly

Post by radissthor »

Hi all,

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}
At the end of the document, before \end{document}, I have \bibliographystyle{apacite}
\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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Generation of Bibliography behaves randomly

Post by localghost »

radissthor wrote:[…] This is my first post, and I'm relatively new using LaTeX, so I apologize for any errors I might be doing. […]
Since you are talking about mistakes, you should carefully read a special thread [1]. I'm sure you will find some helpful tips to phrase your question in a way that it contains some useful information. At the moment the information you provided is insufficient to work out a solution.

I have some questions. Can you explain what these „Commands for header“ are for and how they are related to the problem? What do you want to achieve with these commands? I only ask since headers are done usually completely different.

[1] View topic: Avoidable Mistakes


Best regards and welcome to the board
Thorsten
radissthor
Posts: 2
Joined: Thu Nov 17, 2011 10:41 am

Generation of Bibliography behaves randomly

Post by radissthor »

Hi Thorsten,

Thanks for your quick reply.

The command in the preable were taken from a template I use to write assignments. It has never caused me any trouble, but just in case I tried creating the bibliography from a document with the classic article preamble, but I got the same errors, so I believe it has nothing to do with the packages I'm loading or the format I'm specifying in the preamble.

I don't know what other information I can provide to make my problem more understandable....


EDIT: I added an image of the references that are generated when I click on the View PDF button of texmaker (because the quick build option gives me the undefined control sequence error). What happens is that 1) For some reason the name of the authors appear in square brackets and 2) the keyword of the bib entry is also mentioned in the produced pdf, which is very strange.
Well, any help is appreciated.
bad_latex_references.jpg
bad_latex_references.jpg (43.25 KiB) Viewed 1897 times
Post Reply