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.

Is it possible to just use plainnat without using the package natbib? When I do so, multiple author references don't work too well. I get

[author et al (year)auhtor1, author2 and author3]

when what I want is just

[author et al (year)]

Anyway to fix this?

If I add \usepackage{natbib} I just get an error:

Undefined control  sequence.

\chtapter ...ace {10\p@ }}\algocf@original@chapter

1.1 \begin{thebibliography}{28}

So using plainnat without natbib is the closest I got to get this working.

Example:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{rotating}
\usepackage{listings}
\usepackage[ruled,vlined]{algorithm2e}
\usepackage[ngerman,english]{babel}
\usepackage{babelbib,url} 
\usepackage{breakcites}
%\usepackage{natbib}
%\usepackage[square, comma, sort&compress]{natbib}
\usepackage[latin1]{inputenc}
\usepackage{pslatex}
\usepackage{setspace}
\setstretch{2} 
\begin{document}
    \cite{DPS2000}
\newpage\pagebreak
\nocite{*}
\bibliographystyle{plainnat}
\bibliography{references}
\end{document}

It compiles fine but I get

[author et al (year)auhtor1, author2 and author3]

style referencing and if I uncomment natbib it won't compile.

share|improve this question
add comment

2 Answers

up vote 7 down vote accepted

The problem is that the algorithm2e expects \chapter to be defined. It makes some changes to how the bibliography is printed which do not make sense. One fix is to do

\let\chapter\section

before loading algorithm2e: the problem should be go away.

share|improve this answer
add comment

Load algorithm2e after natbib.

share|improve this answer
add comment

Your Answer

 
discard

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