GeneralProblem with BibTeX database file

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Mulligan
Posts: 4
Joined: Mon Dec 08, 2008 2:51 pm

Problem with BibTeX database file

Post by Mulligan »

Hello,

I searched the site using various keywords but did not find a solution to my problem. I am new to the board and would greatly appreciate your help.

Having recently bought a new computer that has Vista, I am having a problem with my .bib file on that new machine but not the old one I use. That is, I can run the following (below) .tex/.bib files fine on my old (XP) computer but not with my new Vista computer. I have reinstalled MikTex and Winedt on the new Vista machine twice but it did not solve the problem.

Here (below) are copy/pastes of (respectively) my .tex file, .bib file, and WinEdt output. Please help me determine what's wrong :)

Please note that in the .tex syntax, below, it compiles just fine (produces a .pdf) on my new Vista computer when I run it with ONLY the 'Schwind:96' citation (which is an example citation that came with MikTex) but NOT when I include the 'Abraham:2008' citation that I added last week myself using my old (XP) machine.

1. the .tex file

\documentclass[12pt,fleqn,titlepage]{article}
\usepackage{setspace}
\usepackage{harvard}
\usepackage{lscape}
\usepackage{pdflscape}
\usepackage[pdftex]{graphicx}
\usepackage{geometry}
\interfootnotelinepenalty=6000
\usepackage{rotating}
\usepackage{tabulary}
\usepackage{longtable}
\usepackage{amsmath}

\begin{document}

\cite{Schwind:96}

\cite{Abraham:2008}

\bibliographystyle{apsa}
\bibliography{testbib}
\end{document}

2. The .bib file

@article{Schwind:96,
author = {Camilla B. Schwind},
title = {Knowledge Based Language Tutoring},
journal = {Computer Assisted Language Learning},
publisher = {Svets},
year = 1996
}
@ARTICLE{Abraham:2008,
AUTHOR = {Abraham, Anna and D. Yves von-Cramon and Ricarda I. Schubotz},
TITLE = {Meeting George Bush Versus Meeting Cinderella: The Neural Response When Telling Apart What is Real from What is Fictional in the Context of Our Reality},
JOURNAL = {Journal of Cognitive Neuroscience},
YEAR = {2008},
volume = {20},
pages = {965--976},
}
\endinput

3. the WinEdt output (error messages in blue)

Command Line: bibtex.exe "test"
Startup Folder: C:\[edited]\test

This is BibTeX, Version 0.99c (MiKTeX 2.5)
The top-level auxiliary file: test.aux
The style file: apsa.bst
Database file #1: testbib.bib


Command Line: texify.exe --pdf "C:\[edited]\test.tex"
Startup Folder: C:\[edited]\test

This is pdfeTeX, Version 3.141592-1.30.6-2.2 (MiKTeX 2.5)
entering extended mode
(C:\[edited]\test.tex
LaTeX2e <2005/12/01>
Babel <v3.8g> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, french, loaded.
("C:\Program Files\MiKTeX2.5\tex\latex\base\article.cls"
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
("C:\Program Files\MiKTeX2.5\tex\latex\base\fleqn.clo")
("C:\Program Files\MiKTeX2.5\tex\latex\base\size12.clo"))
("C:\Program Files\MiKTeX2.5\tex\latex\setspace\setspace.sty"
Package: `setspace' 6.7 <2000/12/01>
) ("C:\Program Files\MiKTeX2.5\tex\latex\economic\harvard.sty"
harvard bibliography,)
("C:\Program Files\MiKTeX2.5\tex\latex\graphics\lscape.sty"
("C:\Program Files\MiKTeX2.5\tex\latex\graphics\graphics.sty"
("C:\Program Files\MiKTeX2.5\tex\latex\graphics\trig.sty")
("C:\Program Files\MiKTeX2.5\tex\latex\00miktex\graphics.cfg")
("C:\Program Files\MiKTeX2.5\tex\latex\graphics\pdftex.def")))
("C:\Program Files\MiKTeX2.5\tex\latex\oberdiek\pdflscape.sty")
("C:\Program Files\MiKTeX2.5\tex\latex\graphics\graphicx.sty"
("C:\Program Files\MiKTeX2.5\tex\latex\graphics\keyval.sty"))
("C:\Program Files\MiKTeX2.5\tex\latex\geometry\geometry.sty"
("C:\Program Files\MiKTeX2.5\tex\latex\geometry\geometry.cfg"))
("C:\Program Files\MiKTeX2.5\tex\latex\rotating\rotating.sty"
("C:\Program Files\MiKTeX2.5\tex\latex\base\ifthen.sty"))
("C:\Program Files\MiKTeX2.5\tex\latex\tabulary\tabulary.sty"
("C:\Program Files\MiKTeX2.5\tex\latex\tools\array.sty"))
("C:\Program Files\MiKTeX2.5\tex\latex\tools\longtable.sty")
("C:\Program Files\MiKTeX2.5\tex\latex\amsmath\amsmath.sty"
For additional information on amsmath, use the `?' option.
("C:\Program Files\MiKTeX2.5\tex\latex\amsmath\amstext.sty"
("C:\Program Files\MiKTeX2.5\tex\latex\amsmath\amsgen.sty"))
("C:\Program Files\MiKTeX2.5\tex\latex\amsmath\amsbsy.sty")
("C:\Program Files\MiKTeX2.5\tex\latex\amsmath\amsopn.sty"))
("C:\Program Files\MiKTeX2.5\tex\latex\supertabular\supertabular.sty")
(test.aux) ("C:\Program Files\MiKTeX2.5\tex\context\base\supp-pdf.tex"
[Loading MPS to PDF converter (version 2006.09.02).]
)

LaTeX Warning: Citation `Schwind:96' on page 1 undefined on input line 18.


LaTeX Warning: Citation `Abraham:2008' on page 1 undefined on input line 20.

(test.bbl
! Undefined control sequence.
<write> ...:2008}{Abraham, von Cramon \harvardand
\ Schubotz}{Abraham, von C...
l.4 \harvardand\ Schubotz}{2008}{Abraham:2008}

?

[This is the end of the WinEdt output]

Thanks for your help!

Ken

Recommended reading 2024:

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

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

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Problem with BibTeX database file

Post by phi »

Hello,

I think I can track down the problem to the last error, the two warnings are caused by it and will vanish as soon as you can resolve the error. It seems that your bibliography style separates author names by \harvardand (this is why the problem only occurs with multiple authors), but none of your packages defines this command. I have looked at the source code of the harvard package, but it doesn't support the apsa bibliography style. If you say \bibliographystyle{apsa}, then there must be a file called apsa.bst. A Google search shows that you are presumably the only person in the world to own that file. Is it a custom bibliography style that was written by you? Perhaps it spits out some \citationstyle command that makes harvard redefine \harvardand, but since it doesn't know about your bibliography style, this must fail. Do you really use the correct bibliography style and not, say, apsr? If you are sure that apsa is correct, then you probably have to redefine \harvardand yourself.
Mulligan
Posts: 4
Joined: Mon Dec 08, 2008 2:51 pm

Re: Problem with BibTeX database file

Post by Mulligan »

Thank you Phi for the reply. I am sorry - I AM using apsr.bst (I don't know why I had renamed it). Just to be sure I got another copy of apsr.bst (from http://ctan.releasenotes.org/macros/lat ... d/apsr.bst).

I amended my.tex file above (in my previous message) to reflect the change (to apsr.bst), ran it again, and got the same error message as above.

I can't figure out why. It runs fine on my laptop. What gives?

I would most appreciate any other suggestions you or others might have.

Thanks! :)

Ken
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Problem with BibTeX database file

Post by phi »

Your code is correct, and after changing apsa to apsr, it runs fine on my system. Could you perhaps post your whole log file?
Mulligan
Posts: 4
Joined: Mon Dec 08, 2008 2:51 pm

Problem with BibTeX database file

Post by Mulligan »

Thank you Phi. Here (below) is my entire log file.

Code: Select all

This is pdfeTeX, Version 3.141592-1.30.6-2.2 (MiKTeX 2.5) (preloaded format=pdflatex 2008.12.9)  9 DEC 2008 08:55
entering extended mode
**C:/Users/[edited]/test.tex
(C:\Users\[edited]\test.tex
LaTeX2e <2005/12/01>
Babel <v3.8g> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, french, loaded.
(C:\texmf\tex\latex\base\article.cls
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
(C:\texmf\tex\latex\base\fleqn.clo
File: fleqn.clo 1998/08/17 v1.1c Standard LaTeX option (flush left equations)
\mathindent=\dimen102
) (C:\texmf\tex\latex\base\size12.clo
File: size12.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen103
)
(C:\texmf\tex\latex\setspace\setspace.sty
Package: setspace 2000/12/01 6.7 Contributed and Supported LaTeX2e package

Package: `setspace' 6.7 <2000/12/01>
) (C:\texmf\tex\latex\economic\harvard.sty harvard bibliography,)
(C:\texmf\tex\latex\graphics\lscape.sty
Package: lscape 2000/10/22 v3.01 Landscape Pages (DPC)

(C:\texmf\tex\latex\graphics\graphics.sty
Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
 (C:\texmf\tex\latex\graphics\trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
) (C:\texmf\tex\latex\00miktex\graphics.cfg
File: graphics.cfg 2005/12/29 v1.2 MiKTeX 'graphics' configuration
)
Package graphics Info: Driver file: pdftex.def on input line 90.

(C:\texmf\tex\latex\graphics\pdftex.def
File: pdftex.def 2007/01/08 v0.04d Graphics/color for pdfTeX
\Gread@gobject=\count87
))) (pdflscape.sty
Package: pdflscape 2001/02/04 v0.2 Landscape pages in PDF (HO)
)
(C:\texmf\tex\latex\graphics\graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)

(C:\texmf\tex\latex\graphics\keyval.sty
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
\Gin@req@height=\dimen104
\Gin@req@width=\dimen105
)
(C:\texmf\tex\latex\geometry\geometry.sty
Package: geometry 2002/07/08 v3.2 Page Geometry
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen106
\Gm@wd@mp=\dimen107
\Gm@odd@mp=\dimen108
\Gm@even@mp=\dimen109
\Gm@dimlist=\toks15

(C:\texmf\tex\latex\geometry\geometry.cfg))
(C:\texmf\tex\latex\rotating\rotating.sty
Package: rotating 1997/09/26 v2.13 Rotation package
 (C:\texmf\tex\latex\base\ifthen.sty
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
)
\c@r@tfl@t=\count91
\rot@float@box=\box26
) (C:\texmf\tex\latex\tabulary\tabulary.sty
Package: tabulary 2003/09/14 v0.8 tabulary package (DPC)
 (C:\texmf\tex\latex\tools\array.sty
Package: array 2005/08/23 v2.4b Tabular extension package (FMi)
\col@sep=\dimen110
\extrarowheight=\dimen111
\NC@list=\toks16
\extratabsurround=\skip43
\backup@length=\skip44
)
\TY@count=\count92
\TY@linewidth=\dimen112
\tymin=\dimen113
\tymax=\dimen114
\TY@tablewidth=\dimen115
) (C:\texmf\tex\latex\tools\longtable.sty
Package: longtable 2004/02/01 v4.11 Multi-page Table package (DPC)
\LTleft=\skip45
\LTright=\skip46
\LTpre=\skip47
\LTpost=\skip48
\LTchunksize=\count93
\LTcapwidth=\dimen116
\LT@head=\box27
\LT@firsthead=\box28
\LT@foot=\box29
\LT@lastfoot=\box30
\LT@cols=\count94
\LT@rows=\count95
\c@LT@tables=\count96
\c@LT@chunks=\count97
\LT@p@ftn=\toks17
)
(C:\texmf\tex\latex\amsmath\amsmath.sty
Package: amsmath 2000/07/18 v2.13 AMS math features
\@mathmargin=\skip49

For additional information on amsmath, use the `?' option.
(C:\texmf\tex\latex\amsmath\amstext.sty
Package: amstext 2000/06/29 v2.01
 (C:\texmf\tex\latex\amsmath\amsgen.sty
File: amsgen.sty 1999/11/30 v2.0
\@emptytoks=\toks18
\ex@=\dimen117
)) (C:\texmf\tex\latex\amsmath\amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d
\pmbraise@=\dimen118
)
(C:\texmf\tex\latex\amsmath\amsopn.sty
Package: amsopn 1999/12/14 v2.01 operator names
)
\inf@bad=\count98
LaTeX Info: Redefining \frac on input line 211.
\uproot@=\count99
\leftroot@=\count100
LaTeX Info: Redefining \overline on input line 307.
\classnum@=\count101
\DOTSCASE@=\count102
LaTeX Info: Redefining \ldots on input line 379.
LaTeX Info: Redefining \dots on input line 382.
LaTeX Info: Redefining \cdots on input line 467.
\Mathstrutbox@=\box31
\strutbox@=\box32
\big@size=\dimen119
LaTeX Font Info:    Redeclaring font encoding OML on input line 567.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 568.
\macc@depth=\count103
\c@MaxMatrixCols=\count104
\dotsspace@=\muskip10
\c@parentequation=\count105
\dspbrk@lvl=\count106
\tag@help=\toks19
\row@=\count107
\column@=\count108
\maxfields@=\count109
\andhelp@=\toks20
\eqnshift@=\dimen120
\alignsep@=\dimen121
\tagshift@=\dimen122
\tagwidth@=\dimen123
\totwidth@=\dimen124
\lineht@=\dimen125
\@envbody=\toks21
\multlinegap=\skip50
\multlinetaggap=\skip51
\mathdisplay@stack=\toks22
LaTeX Info: Redefining \[ on input line 2666.
LaTeX Info: Redefining \] on input line 2667.
) (test.aux)
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 14.
LaTeX Font Info:    ... okay on input line 14.

(C:\texmf\tex\context\base\supp-pdf.tex
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count110
\scratchdimen=\dimen126
\scratchbox=\box33
\nofMPsegments=\count111
\nofMParguments=\count112
\MPscratchCnt=\count113
\MPscratchDim=\dimen127
\MPnumerator=\count114
\everyMPtoPDFconversion=\toks23
)
-------------------- Geometry parameters
paper: class default
landscape: --
twocolumn: --
twoside: --
asymmetric: --
h-parts: 92.14519pt, 0.7\paperwidth , 92.14519pt (default)
v-parts: 95.39737pt, 0.7\paperheight , 143.09605pt (default)
hmarginratio: 1:1
vmarginratio: 2:3
lines: --
heightrounded: --
bindingoffset: 0.0pt
truedimen: --
includehead: --
includefoot: --
includemp: --
driver: pdftex
-------------------- Page layout dimensions and switches
\paperwidth  614.295pt
\paperheight 794.96999pt
\textwidth  430.00462pt
\textheight 556.47656pt
\oddsidemargin  19.8752pt
\evensidemargin 19.8752pt
\topmargin  -13.87262pt
\headheight 12.0pt
\headsep    25.0pt
\footskip   30.0pt
\marginparwidth 44.0pt
\marginparsep   10.0pt
\columnsep  10.0pt
\skip\footins  10.8pt plus 4.0pt minus 2.0pt
\hoffset 0.0pt
\voffset 0.0pt
\mag 1000

(1in=72.27pt, 1cm=28.45pt)
-----------------------


LaTeX Warning: Citation `Schwind:96' on page 1 undefined on input line 16.


LaTeX Warning: Citation `Abraham:2008' on page 1 undefined on input line 18.

(test.bbl
! Undefined control sequence.
<write> ...:2008}{Abraham, von Cramon \harvardand 
                                                  \ Schubotz}{Abraham, von C...
l.4   \harvardand\ Schubotz}{2008}{Abraham:2008}
                                                
? 
! Emergency stop.
<write> ...:2008}{Abraham, von Cramon \harvardand 
                                                  \ Schubotz}{Abraham, von C...
l.4   \harvardand\ Schubotz}{2008}{Abraham:2008}
                                                
End of file on the terminal!

 
Here is how much of TeX's memory you used:
 2226 strings out of 95419
 25521 string characters out of 1187883
 82116 words of memory out of 1085816
 5303 multiletter control sequences out of 60000
 4851 words of font info for 18 fonts, out of 1000000 for 2000
 14 hyphenation exceptions out of 8191
 27i,1n,24p,273b,102s stack positions out of 5000i,500n,10000p,200000b,32768s
PDF statistics:
 0 PDF objects out of 300000
 0 named destinations out of 300000
 1 words of extra memory for PDF output out of 10000
No pages of output.
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Problem with BibTeX database file

Post by phi »

Thanks, I think the following line shows the problem:

Code: Select all

(C:\texmf\tex\latex\economic\harvard.sty harvard bibliography,)
harvard.sty ought to be in the directory harvard, not economic. The harvard package also doesn't output the string "harvard bibliography". So there is a package name clash between the real harvard package and another package that is also called harvard, but does something different or is just older. Try to delete the wrong harvard.sty in the economic directory using the MikTeX package manager. If this doesn't work, you have to replace it manually by the correct version from CTAN. This seems to be a very common problem: A Google search for "economic/harvard.sty" lists dozens of similar questions.
Another possibility would be switching to the more up-to-date natbib package, which can simulate the behavior of harvard.
Mulligan
Posts: 4
Joined: Mon Dec 08, 2008 2:51 pm

Re: Problem with BibTeX database file

Post by Mulligan »

Fixed! :mrgreen:

Thanks very much for your help, Phi.

It actually works with the older harvard (created in 1995, which was in the harvard folder) but not the newer harvard (2006, in the economic folder). I replaced the new harvard in the economic folder with the old harvard. Now it works.

Sorry for the long code post.

Ken
Post Reply