# Columnsep affect line breaks in a twocolumn paper

With the following code, TeX break lines after every two \myboxs, which is what I want.

\documentclass{article}

\RequirePackage[a3paper,landscape,twocolumn,columnsep=6cm,left=3cm,right=3cm]{geometry}
\usepackage{lipsum}

\setlength{\parindent}{0pt}
\newcommand{\mybox}[1]{\makebox[0.5\linewidth][l]{#1}\allowbreak\ignorespaces}

\begin{document}

\lipsum[2]
\mybox{AAAA}
\mybox{BBBB}
\mybox{CCCC}
\mybox{DDDD}

\lipsum[2]
\mybox{AAAA}
\mybox{BBBB}
\mybox{CCCC}
\mybox{DDDD}

\end{document}


Now I change geometry settings from

\RequirePackage[a3paper,landscape,twocolumn,columnsep=6cm,left=3cm,right=3cm]{geometry}


to the following line

\RequirePackage[a3paper,landscape,twocolumn,columnsep=4cm,left=5cm,right=3cm]{geometry}


Even if linewidth is the same, TeX changes its line breaking.

What is the problem with it? And how to improve \mybox command to get correct result with different columnsep?

• In the second case, \linewidth is 27970197sp, but twice half the \linewidth is computed as 27970196sp. One scaled point can make the difference. You get an underfull \hbox also if you do \hbox to 2in{\hskip1in\hskip1in} for precisely the same 1sp difference. – egreg Jun 29 '18 at 20:30

\newcommand{\mybox}[1]{\makebox[0.5\linewidth][l]{#1}\allowbreak\hfill\ignorespaces}