Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am using TexMaker 1.9.9 and managing my references with KbibTeX. I have all the LiveTex package up to date from Debian Stable release.

I always use the same template to write assignments:

\documentclass[10pt]{article}

% Some packages I always load, can be omitted:
\usepackage{url,graphicx,tabularx,array,geometry,amsmath,amssymb,apacite}

% Change english to the language you are writing in (for english this can   often be omitted):
\usepackage[english]{babel}

% Uncomment to use Sweave:
% \usepackage{Sweave}
% This is not a comment! Leave it in:
% need no \usepackage{Sweave.sty}

% 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]}

%\linespread{2} %-- Uncomment for Double Space

%%% BEGIN DOCUMENT %%%

\begin{document}

\title{Title goes here}
\line
\leftright{\today}{Name (student number)} %-- left and right positions in the header

And my bibliography environment is:

\bibliographystyle{apa}
\bibliography{SIP_Project}



\end{document}

My problem is that for some reason none of the references are written down, and except I get question marks where the references should be. Now, I know this happens quite often and indeed it's not the first time. But before this would be fixed by compiling a few more times and then all would be good. But now, something is clearly wrong. I have managed to reproduce the error.

I start with only two files in my folder, the .tex file and the .bib file. I do a Latex compile and the process starts and exits normally. Also, the files .dvi, .log and .aux have been created. Now, I run BibTex from TexMaker. Process starts but ends with errors. The files .bbl and .blg are created. Now, I do a quick build to see the pdf. The pdf file compiles with all references being shown as question marks, and with only 3 references listed at the bottom of the file (I used 7 references).

So, I close the pdf and try to make a Quick Build again. This time, the pdf doesn't compile and I get the following error (among others)

! Undefined control sequence.
\b@King1998 ->\astroncite
{King and Napa}{1998}
l.54 \item The study by \citeA{King1998}
is a study on social pshycology who...
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.

This is another of the messages:

! Undefined control sequence.
\b@King1998 ->\astroncite
{King and Napa}{1998}
l.54 \item The study by \citeA{King1998}
is a study on social pshycology who...
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.
! Use of \@year@ doesn't match its definition.
\Y@King1998 ->\@year@ \astroncite

And another:

{King and Napa}{1998}
l.54 \item The study by \citeA{King1998}
is a study on social pshycology who...
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.
! Undefined control sequence.

And so on. All the error messages have this format, but I don't see anything wrong with either my tex file or my bib file. By the way, my bib file was automatically generated by Mendeley, so I doubt there is something wrong with the entries. Just in case, the first entry I cite, which appears to be at least one of the problems, is the following on my .bib file:

@Article{ King1998,
    author = "L a King and C K Napa",
    issn = "0022-3514",
    journal = "Journal of personality and social psychology",
    keywords = "Adolescent, Adult, Aged, Aged, 80 and over, Female, Folklore, Happiness, Humans, Individuality, Job Satisfaction, Male, Middle Aged, Morals, Personal Satisfaction, Quality of Life, Social Values, Socioeconomic Factors, Students, Students: psychology",
month = jul,
number = "1",
pages = "156--65",
pmid = "9686456",
title = "{What makes a life good?}",
url = "http://www.ncbi.nlm.nih.gov/pubmed/9686456",
volume = "75",
year = "1998"
}

I have been using LaTex with TexMaker for quite some time now. I have used KBibTex and the same tex template over and over again. My bib files are always automatically generated from Mendeley, my bibliography manager. So I don't know what is wrong this time. Any comments or help are much appreciated.

share|improve this question
    
Welcome to TeX.SX. –  Claudio Fiandrino Apr 19 '13 at 8:49
    
Why don't you use one of the styles which comes with apacite instead of apa? –  Ulrike Fischer Apr 19 '13 at 8:54
    
"Now, I run BibTex from TexMaker. Process starts but ends with errors." What errors? –  Paul Stanley Apr 19 '13 at 9:30
    
ClaudioFiandrino Thx for the welcoming :) UlrikeFischer before I start using other software, I would like to know why the programs and templates I have been using for over a year now suddently stopped working. @PaulStanley The errors are not shown on TexMaker, but I assume they are the same errors I posted in my post when I compiled using the Quick Build option. –  Hernan_L Apr 19 '13 at 9:45
    
@Hernan_L: I get the same error. Obviously the command \astroncite needs a sensible definition. My guess is that you updated something (perhaps apacite.sty). Instead of changing the style you could also try \usepackage[natbibapa]{apacite}. –  Ulrike Fischer Apr 19 '13 at 10:35
show 2 more comments

1 Answer

up vote 5 down vote accepted

The apa.bst style is a very old BibTeX style which is not compatible with the apacite package.

The documentation of apacite.sty says to use one of

\bibliographystyle{apacite}
\bibliographystyle{apacitex}
\bibliographystyle{apacann}
\bibliographystyle{apacannx}

Section 2, page 8:

enter image description here

share|improve this answer
    
Thanks for your reply. I tried using apacite, apacitex, apacann, and apacannx. I deleted and recreated all the log and extra files in each build, but I still have all the same error messages. And they are all regarding my citations, which according to LaTeX are undefined. So unfortunately this does not fix the problem for me. –  Hernan_L Apr 22 '13 at 6:18
    
UPDATE: I did two things. One, I downloaded the latest version of apacite and also, I changed all my \citeA{} commands to just cite{}. Then the pdf was able to compile with only question marks. I ran latex and bibtex a couple of times, compiled again and now I finally have all my citations in my place. I can even use the \citeA{} again, so all is good. I guess my version of apacite was too old. Thanks all for your help –  Hernan_L Apr 22 '13 at 8:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.