[Tex/LaTex] Onecolumn till end of page in twocolumn mode

environmentsmulticolpage-breakingtwo-column

I know about using the widetext environment for setting text in onecolumn mode and the multicols package for effortless switching between one- and twocolumn mode, but I think this is not too great if the onceolumn text is very close to the bottom of the page. I'd like to put some text in onecolumn mode and have latex format the remainder of the page in onecolumn mode if the initial text is close to the bottom of the page. Have a look at this:

enter image description here

Note that the text after the CKM matrix (which is set in onecolumn-mode) is set in onecolumn mode, which I think is very pleasing to the eye.
Is there any solution to my question?

PS: Another solution I've been thinking about would be a float-like math environment which could be set with the b option but I'd fear the possibility that it floats to the next page.

Best Answer

The answer to this question is: "No, in general it is not easily possible to automatically change from one-column to two-column or vice versa at the end of a page". As TeX cuts pages asyncronously, paragraphs that span across a page break will already be cut (into one or two columns) by the time TeX makes the page break decisions.

The reason that multicolscan switch between different column numbers is due to the fact that there the user specifies where in the source this happens not where in the output.

Having said that: yes TeX is Turing machine and yes, if you disable a lot of that in-built functionality of TeX and manage everything by ourself, then there are ways to achieve something like this. Basically one has to measure how much space is left to the bottom of the next page, then how long the next paragraph will be and if it wouldn't fit, build a \parshape definition that changes the column width at the right point. Unfortunately there are all kind of complications that go with this approach (and it is difficult to make if work in a general way, that is if the text could contain any kind of TeX construct and formulas etc).

So bottom line, there aren't any robust implementations for this kind of approach for LaTeX (or ConTeXt as far as I know).