Texmaker and TeXstudioaarrrh, bibtex is driving me mad!

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Post Reply
Trine
Posts: 11
Joined: Tue Dec 18, 2007 1:41 pm

aarrrh, bibtex is driving me mad!

Post by Trine »

I have tried to get bibtex up and running for what feels like an eternity...
I want to get my references to look like (author, year)

I have created at .bib file
with content looking like this:

Code: Select all

@Article{Nielsen,
author = {Arne Thorshøj Nielsen and Niels Hemmingsen Schovsbo},
title = {Cambrian to basal Ordovician lithostratigraphy in southern Scandinavia},
journal = {DGF},
year = {2007},
volume = {53},
pages = {47-92},
}
I have included the bibfile in my document where I want it (at the end of the document, after all text)

Code: Select all

\begin{document}

\bibliography{bibliografi}
\end{document}
In my preamble I have tried to do different things, or rather, different packages, but nothing (!!!!) seems to work.

eksample

Code: Select all

\usepackage{authordate1}
\bibliographystyle{authordate1}
I have tried alpha, authordate1, harvard, chicago... and several more

At the moment, when I compile my main document, I says the the authordate1.sty is undefined (excited with errors)
When I compile my BibTeX file, it says "excited with errors" to.

Now, if I exclude the \usepackage command, I can compile the .bib file - no problem, but by compiling the main document, I get

Code: Select all

\udefined control sequence. \cite{Nielsen}
I have also used the package cite in my preamble.

What am I doing wrong?
How can I find out what style options I have? I cannot locate the files in my filesystem.
Is it somthing in TeXmaker I haven't configured right?

In "configure" I have defined the command for BibTex as the "executeable" in usr/bin/bibtex

I really hope anyone can help me. I am working on my bachelor and really need this to work.

Thanks

Trine

Recommended reading 2024:

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

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

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

aarrrh, bibtex is driving me mad!

Post by Juanjo »

I provide you a minimal working example to see how this works. Write the following code in a tex file, say, foo.tex:

Code: Select all

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[applemac]{inputenx}

\begin{document}

This is my first document with a bibliography generated by
Bib\TeX. Now I cite an article by Nielsen and Schovsbo~\cite{Nielsen}.

\bibliographystyle{plain}
\bibliography{bibliografi}

\end{document}
I assume from your post that the bib file is bibliografi.bib. Since you use non-ascii characters, you need to load inputenx. I'm a Mac user, so I do it with the applemac option. You may need a different one (latin1, ansinew, utf8...).
Run LaTeX. Then run BibTeX (there should be a button or menu option in your editor; if not, open a console and type "bibtex foo"). After that, there should be a file called foo.bbl. Run LaTeX again. You will see the bibliography in your document. Run LaTeX once more to get the citation with the correct number.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Trine
Posts: 11
Joined: Tue Dec 18, 2007 1:41 pm

aarrrh, bibtex is driving me mad!

Post by Trine »

Thank you for taking your time to look into my problem.

Well that works - no problems at all.
I use

Code: Select all

\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
No error messages, neither when compiling the .bib file, nor the .tex

I still haven't solved the problem with other document. When generating a PDF-output, I can se the citations and bibliography fine, by I stille get the "excited with errors" message.
I could just ignore this message, but I am affraid that it will suddenly crash or somthing, because somthing is obviusly not right.

Trine
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

aarrrh, bibtex is driving me mad!

Post by Juanjo »

Trine wrote: I still haven't solved the problem with other document. When generating a PDF-output, I can se the citations and bibliography fine, by I stille get the "excited with errors" message.
I could just ignore this message, but I am affraid that it will suddenly crash or somthing, because somthing is obviusly not right.
To solve that problem, you should provide a minimal working example producing the weird message you report. This example should be as short as possible, like mine. Then attach here, possibly compressed in a zip file, the tex and bib files as well as the log and blg files.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Trine
Posts: 11
Joined: Tue Dec 18, 2007 1:41 pm

aarrrh, bibtex is driving me mad!

Post by Trine »

Ok, here goes

Code: Select all

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}

This is my first document with a bibliography generated by
Bib\TeX. Now I cite an article by Nielsen and Schovsbo~\cite{Nielsen}.

\bibliographystyle{authordate1}
\bibliography{bibliografi}

\end{document}
I have just changed the style
************** SUMMARY ************** :
line 9 -> ! Undefined control sequence. ...icle by Nielsen and Schovsbo~\cite{Nielsen}
line 3 -> ! Undefined control sequence. ...tename{Nielsen \& Schovsbo, }2007]{Nielsen}
************** LOG FILE *************** :
This is also the message I get in my other document every time I have made a \cite{}

I suppose the problem might be, that I do not have the required package (or packages, as the same happens when I use almost any other style than "plain").
If I change style to e.g. harvard, I get erorrs when compiling .bib file, but not the main .tex file. (.tex fist, then .bib then .tex again)
I am using TeXlive and TeXMaker in Ubuntu 8.04
I do not know how to find out what packages I have available or where to install new ones if I cannot use Synaptic or Add/remove
Trine
Posts: 11
Joined: Tue Dec 18, 2007 1:41 pm

aarrrh, bibtex is driving me mad!

Post by Trine »

I have the texlive-bibtex-extra package that should provide me with following:
This package includes the following CTAN packages:
apacite -- Citation style following rules of American Psychological Assoc.
beebe -- TeX-related bibliographies and BibTeX styles.
bibarts -- No caption.
bibhtml -- BibTeX support for HTML files.
biblist -- BibTeX styles by Joachim Schrod.
bibtopic -- Include multiple `by topic' bibliographies in a document.
bibunits -- Multiple bibliographies in one document.
compactbib -- Allows many thebibliography environments with continuous
numbering.
custom-bib -- Customised BibTeX styles.
doipubmed -- The doipubmed package.
elsevier-bib -- The elsevier-bib package.
footbib -- Bibliographic references as footnotes.
harvard -- The Harvard bibliography style family.
harvmac -- Macros for scientific articles.
ijqc -- The ijqc package.
inlinebib -- Inlined \cites.
iopart-num -- Numeric citation style for IOP journals.
jneurosci -- The jneurosci package.
jurabib -- Extended BibTeX citation support for the humanities and legal
texts.
listbib -- Lists contents of bibtex files for archival purposes.
multibib -- Multiple bibliographies within one document.
munich -- The munich package.
perception -- BibTeX style for the journal Perception.
rsc -- The rsc package.
sort-by-letters -- The sort-by-letters package.
urlbst -- Web support for BibTeX.
amongst these is the harvard bibliography style family.
If I use the harvard style, the .bib file is excited with errors

Code: Select all

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc} % definer formatet p din tekst fil
\usepackage[T1]{fontenc}

\begin{document}

This is my first document with a bibliography generated by
Bib\TeX. Now I cite an article by Nielsen and Schovsbo~\cite{Nielsen}.
apalike

\bibliographystyle{harvard}
\bibliography{bibliografi}

\end{document}
the bibfile looks the same as in the earlier given examples.
Log file summary:
************** SUMMARY ************** :
line 9 -> Warning : Citation `Nielsen' on page 1 undefined on input line 9.
line 9 -> Warning : Citation `Nielsen' on page 1 undefined on input line 9.
line 0 -> Warning : There were undefined references.
line 0 -> Warning : There were undefined references.
************** LOG FILE *************** :
Trine
Posts: 11
Joined: Tue Dec 18, 2007 1:41 pm

aarrrh, bibtex is driving me mad!

Post by Trine »

well, somtimes it helps to write down ones problems ;)

I figured it out at last

Code: Select all

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{harvard}

\begin{document}

This is my first document with a bibliography generated by
Bib\TeX. Now I cite an article by Nielsen and Schovsbo~\cite{Nielsen}.
apalike

\bibliographystyle{agsm}
\bibliography{bibliografi}

\end{document}
This did the trick!

When I think of all the hours I have spend... Well...
Maybe someone else benefits from my efforts and posts here some other time.
I found a .pdf file on the net, describing how to use the harvard bibliography style family (harvard.pdf)
Post Reply