# Why do citations break my page's layout?

I am having troubles with citations. As seen on the attached screenshot, they sometimes don't do linebreaking properly, but produce an error overfull hbox and break my layout.

Here are the relevant packages I include.

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[german]{babel}
\usepackage[hyphens]{url}
\usepackage{jurabib}
\usepackage{pdfpages}


And here is the screenshot:

EDIT: I just found this answer. Neither \usepackage{breakcites} nor \usepackage{cite} helped, but \usepackage{microtype} certainly did. Let's see whether it will solve all linebreaking problems.

-

The problem you have is that you are generate very long citation texts that essentially do not have any breakpoints other than after the / and if you have many of those in a paragraph there may not be any legal linebreaking possible. If you run

\showhyphens{fairlylongword/fairlylongword/fairlylongword,2003}


you can see that only in the first name TeX finds any hyphenation points:

Underfull \hbox (badness 10000) in paragraph at lines 31--31
[] \T1/ptm/m/n/10 fair-ly-long-word/fairlylongword/fairlylongword,2003


The reason is that the moment TeX finds anything other than a letter in a word it stops hyphenation.

Now jurabib doesn't use / but it uses \slash between author names to generate a / and a breakpoint, which explains why you get "(Straub/Weidemann/ ... Weidemann,2007)" but you don't get "(Straub/Weide- ... mann/Weidemann,2007)" which had probably saved you the day.

So the question is where do you want to get linebreaks in? If you want to attempt hyphenating the names using normal hyphenation rules then you need to ensure that this / is not stopping hyphenation. The trick to use is to follow the \slash by some invisible white space (e.g., \hspace{0pt} as this results in starting a new "word".

The jurabib package is highly customizable and all you have to do is to modify the corresponding commands (see jurabib documentation, or if you have TLC2 look at example 12-5-39):

\renewcommand{\jbbtasep}{{\normalfont\slash\hspace{0pt}}}
\renewcommand{\jbbfsasep}{{\normalfont\slash\hspace{0pt}}}
\renewcommand{\jbbstasep}{{\normalfont\slash\hspace{0pt}}}


There are many more possibilities in that area.

-