Generalnatbib error but why?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
sajaman
Posts: 2
Joined: Wed Nov 24, 2010 4:49 pm

natbib error but why?

Post by sajaman »

Hi,

I have a problem with natbib and I can't understand why...

TEX FILE:

Code: Select all

\documentclass[bibtotoc,liststotoc,BCOR5mm,DIV12]{scrbook}
\usepackage{bibgerm}
\usepackage[utf8]{inputenc}
\usepackage{graphicx} 
\usepackage{url} 
\usepackage{hyperref}
\usepackage{natbib}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{setspace}
\onehalfspacing
\renewcommand{\bibhang}{1cm}

\begin{document}

\frontmatter
    \tableofcontents

\mainmatter

\chapter{Einführung}
blablabla \citep{zeileis}

\backmatter
    \listoffigures
	\bibliographystyle{geralpha}
	\bibliography{./Includes/literatur}

\end{document}
BIB file

Code: Select all

@book{zeileis,
	title = {strucchange: An R package for testing for structural change in linear regression models},
	shorttitle = {strucchange},
	publisher = {Citeseer},
	author = {Zeileis},
	year = {2001}
}
If I select the natbib option [numbers] it works... but if i wanna have author-year citations latex says: "! Package natbib Error: Bibliography not compatible with author-year citations."... why does this not work?

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

natbib error but why?

Post by localghost »

The germbib package is obsolete. Use either babelbib or biblatex. Another bibliography style is also suggestive. The code below works, but certainly does not result in the desired bibliography style.

Code: Select all

\begin{filecontents*}{\jobname.bib}
@book{zeileis,
   title = {strucchange: An R package for testing for structural change in linear regression models},
   shorttitle = {strucchange},
   publisher = {Citeseer},
   author = {Zeileis},
   year = {2001}
}
\end{filecontents*}
\documentclass[%
  bibliography=totoc,
  listof=totoc,
  BCOR=5mm,
  DIV12,
  ngerman
]{scrbook}
\usepackage[T1]{fontenc}
\usepackage{selinput}
\SelectInputMappings{%
  adieresis={ä},
  germandbls={ß},
  Euro=€
}
\usepackage{babel}
\usepackage{natbib}
\usepackage[onehalfspacing]{setspace}

\renewcommand{\bibhang}{1cm}

\begin{document}
  \frontmatter
  \tableofcontents

  \mainmatter
  \chapter{Einführung}
    blablabla \citep{zeileis}

  \backmatter
  \listoffigures
  \bibliographystyle{plainnat}
  \bibliography{\jobname}
\end{document}

Thorsten
Post Reply