Paragraph overfull hbox

First off all: I must write with twocolumns. The major problem is the overfull hbox at some equations: from 6pt to 12pt too much. I don't know what to do. So what do you do when you write your articles and an eqaution is too long?

And please don't say I should do things like make the equation to onecolumn or decrease the fontsize. It would be nice if it could look nice and would be practicable :)

\documentclass[twocolumn]{memoir}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}

\begin{document}
\lipsum[1]
\lipsum[1-2]Röntgen asi sdoimqwoidm ååååå øøøø ææææ qoiwdmiqomd ioqwmd ioqmwd ioqmwdioqmwd oiqmwdoiq wmdiom wd.
Here is the equation:
$$F_{hkl} = \sum_{j=1 \rightarrow n} f_j \exp ( 2 \pi i (hx + ky + lz)) \; \exp \left( \frac{- B_j \sin^2 (\theta)}{\lambda^2} \right)$$

\end{document}


PS! Why do it make an underfull hbox because of the "ö"?

• Sorry @Bas, you should know by now how important a minimal working example is. – Johannes_B Oct 29 '14 at 17:30
• memoir comes with a whole bunch of features making most packages redundant. caption seems to bbe one of them. If the headheight is too small, set it to a higher value. The warning couldn't be more clear. Why are you having line ends in your description? – Johannes_B Oct 29 '14 at 17:31
• Also, this seems to be a follow up on memoir Warnung: "The material used in the footer is too large" – Johannes_B Oct 29 '14 at 17:33
• also you should give more sensible titles to your questions. the above title could apply to more or less every memoir question on site. Also "blue errors" is not informative the colour is a feature of your (unspecified) editor (they appear to be warnings not errors) – David Carlisle Oct 29 '14 at 17:47

Your example code does not make an underfull box, so I don't understand the "P.S."

The equation is a fraction over full, there is no general solution in such cases, you just have to adjust. Possibilities include giving variable names to subterms, or splitting the equation over two lines, but here one option is to hide the width of the subscript to the sum, so that the body moves closer to the summation, and then just fits within the width.

Using

 \sum_{\mathclap{j=1 \rightarrow n}}


where \mathclap is a math centred lap from the mathtools package works in this case, however it's still very cramped and I'd use alternative notation for the summation range and for exponentiation, then it fits easily:

\documentclass[twocolumn]{memoir}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage{mathtools}

\begin{document}
\lipsum[1]
\lipsum[1-2]Röntgen asi sdoimqwoidm ååååå øøøø ææææ qoiwdmiqomd ioqwmd ioqmwd ioqmwdioqmwd oiqmwdoiq wmdiom wd.
Here is the equation:
$$F_{hkl} = \sum_{\mathclap{j=1 \rightarrow n}} f_j \exp ( 2 \pi i (hx + ky + lz)) \; \exp \left( \frac{- B_j \sin^2 (\theta)}{\lambda^2} \right)$$
Here is the equation:
$$F_{hkl} = \sum_{j=1}^n f_j e^{ 2 \pi i (hx + ky + lz)} \; e^{\frac{- B_j \sin^2 (\theta)}{\lambda^2}}$$

\end{document}

• Consider using exp(A+B) instead of exp(A)exp(B) to shorten in a different way. – Ethan Bolker Oct 29 '14 at 23:59