# paracol - Error with 0pt wide columns

I need to create a custom three-column environment where the user can manually set the width of the columns, and I ran into this error. Here is a MWE:

\documentclass[10pt,a4paper]{article}

\usepackage{paracol}
\usepackage{lipsum}

\begin{document}

\setlength{\columnsep}{0pt}
\setcolumnwidth{0pt,\fill,0pt}
\begin{paracol}{3}
\switchcolumn[1]
\lipsum[2]
\end{paracol}

\end{document}


ERROR: Package Scaling/filling factor for column/gap width is too large. Error: Your command was ignored.

However, modifying as follows works fine:

\documentclass[10pt,a4paper]{article}

\usepackage{paracol}
\usepackage{lipsum}

\begin{document}

\setlength{\columnsep}{0pt}
\setcolumnwidth{0.05pt,\fill,0.05pt}
\begin{paracol}{3}
\switchcolumn[1]
\lipsum[2]
\end{paracol}

\end{document}


It seems like some division by 0 is occurring, but I do not understand why, since in principle the operation should simply be

\textwidth - 0pt - 0pt.

At the moment I fixed the problem by setting

\setlength{\columnsep}{0.05pt}


but clearly this is not so satisfactory, since I want the column-gap to be 0pt.

• Just out of curiosity, why would you start a 3-column environment and collapse two of those to 0pt? – Superuser27 Mar 15 at 10:59
• In general it should not happen, but with an evil user you never know... – Hugo Mar 15 at 11:08
• Well as a poka-yoke you could just set \columnsep{0.05pt} so even if the user sets the column width to {0pt,\fill,0pt} the document would compile. Or you could just leave it as is and let the user worry about why he/she would even try to set the column width to 0pt :) – Superuser27 Mar 15 at 11:08
• That's basically what I did, but I wonder why this error is generated, since it seems to me that was a legal operation. – Hugo Mar 15 at 11:24
• I guess it sees the 0pt and trying to figure out where it would put some text, the compiler just keeps looking on the next line since on the current one there's literally no place, until it's too large and fails to compile. – Superuser27 Mar 15 at 11:38