[Tex/LaTex] minipage has overfull hbox

boxesminipagetabu

I'm struggling with this piece of LaTeX code:

\begin{minipage}{0.5\textwidth}
    \begin{tabu} to \textwidth {>{\itshape}r c}
        Foo:&\makebox[5cm]{}\\
        \cline{2-2}\\[-0.5em]
        & Foo
    \end{tabu}
\end{minipage}%
\begin{minipage}{0.5\textwidth}
    \begin{tabu} to \textwidth {>{\itshape}r c}
        Bar:&\makebox[5cm]{}\\
        \cline{2-2}\\[-0.5em]
        & Bar
    \end{tabu}
\end{minipage}

It has an overfull hbox of 17.62482pt too wide, just to the right of the minipages (see screenshot below). I can fix it by setting the width to 0.45\textwidth, but that's obviously not the right way.

Overfull hbox in black at the right hand side

How do I pin down what is causing this? Or is there some obvious error in my code that I am missing?

Best Answer

Sigur pointed out the answer in the comments:

Every paragraph is indented as default. Since the minipage begins a new paragraph it too will be indented. This behaviour can be prohibited by putting \noindent just before the new paragraph (the minipage environment), or by using \setlength{\parindent}{0cm} in the top matter.

Related Question