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:


\usepackage{graphicx} %To include graphics
\usepackage[usenames,dvipsnames]{color} %To use color
\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[hang,small,bf]{caption} %To manipulate figure and table captions
\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{enumerate} %To choose enumerator symbols




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


  • 1
    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

One solution: At first I was compiling to .PS, and now I switched to .PDF directly, and the problem was solved. As pointed out by Heiko, some drivers, such as dvips, do not support automatic wrapping. This needs some other adjustments to the code, though. If anybody finds another solution, it will be most welcome.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.