I have a problem with the \citep command of natbib, namely, that I get a lot of bad boxes (overfulls). Most of these happen within a citation. I tried \usepackage[square, authoryear]{natbib} (as suggested by somebody else) but it doesn't work. I cannot use \linebreak because, as I said before, the overfulls happen exactly at the citation, which apparently cannot be broken or hyphenated.

Here comes the code:

\documentclass[11pt,a4paper]{article}

\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsmath}
\setcounter{tocdepth}{3}
\usepackage{latexsym,epsfig}
\usepackage{graphicx} %To include graphics
\usepackage[usenames,dvipsnames]{color} %To use color
\usepackage{hyperref}
\usepackage{breakurl} %This package should be use instead of url, when compiling to .PS
\usepackage{soul} %To use highlighting of the text
\usepackage{array} %To use arrays
\usepackage{verbatim}
\usepackage[hang,small,bf]{caption} %To manipulate figure and table captions
\setlength{\captionmargin}{30pt}
\usepackage{natbib}   % To use bibliography in the style of natural sciences - must come before algorithm2e
\usepackage[ruled,linesnumbered]{algorithm2e}  %To create nice algorithms - must be loaded *after* natbib
\usepackage{url}
\usepackage{enumerate} %To choose enumerator symbols

\title{Synthetic...}

\begin{document}
\maketitle

\begin{thebibliography}{4}

\bibitem[Aarts and Lenstra (1997)]{Aarts97} Aarts, E., Lenstra, J.K. (editors): Local Search in Combinatorial Optimization. John Wiley and Sons (1997).

\end{thebibliography}
\end{document}


• If you are using package hyperref, then check "Wrapped/broken link support" in README. – Heiko Oberdiek Jan 29 '14 at 16:29
• Welcome to TeX.SE! It would be helpful if you provided a minimal example (starting with \documentclass and ending with \end{document}) that gives rise to the problem(s) you're encountering. – Mico Jan 29 '14 at 16:36
• OK, here it goes: – Manolito Pérez Jan 29 '14 at 16:39
• I will check the hyperref package, and if I find anything, I will let you know. Thnx. – Manolito Pérez Jan 29 '14 at 16:49
• Thanks for posting a complete example. Unfortunately, it currently does not generate the problem behavior you're looking to fix. A separate hint: if you highlight the lines of code and click on the {} button above the editor window, the lines will get auto-indented by four spaces, and auto-formatted as code as a result. – Mico Jan 29 '14 at 16:59