# Conditional use of multicol

I'm using the multicol package to get two columns, but sometimes the contents is too wide in a particular column and I was wondering if there is a way to first make sure the contents will fit (horizontally) in two columns and if it doesn't just print a normal one column.

I want to do this in a new environment definition and I thought I could use the ifthen package.

• As in David Carlisle's answer you need give an example here. Are you thinking about equations overfilling lines? If so (or presumably for figures) you could consider a widetext environment (making this conditional would be a nice little exercise). Sep 25 '13 at 9:05

• Thanks for the answers. This matter is about equations that sometimes get wide. Here is an example:\newenvironment[2]{ejemplo}{\par#1\par\ifthenelse{test}{\begin{multicols}{2}#2\end{multicols}}{#2}}{\par}. The problem is i can't find the right test. Oct 2 '13 at 4:06