[Tex/LaTex] Long (two-page) table in twocolumn document

longtabletablestabularxtwo-column

I'm trying to include a not too lengthy table of mathematical notation definitions in a paper I'm writing. The paper is in twocolumn mode, the definition table has to span both columns, because otherwise it is far too narrow to be readable, but even so (and with the table font reduced as much as I can) it still ends up being longer than a page (it's about a page and a half long).

This is an MWE (hopefully, since it wasn't working I ended up simply breaking the table into two instead), of what I tried to do. Unlike how I expected it to work, \afterpage didn't do it's job, and the text page was immediately broken off at that point (leaving the page significantly empty), the two page table worked nice in its spanned column (if I recall right), and then it went back to two column mode and the text after flowed fine.

\documentclass[letterpaper,twoside,twocolumn,10pt]{article}
\usepackage{tabularx}
\usepackage{longtable}
\usepackage{ltablex}
\usepackage{afterpage}

\begin{document}
\twocolumn[
    Title block goes here.

    So does the abstract, but let's ignore those for now.
]

\section{Foo}
Insert much text here.

\afterpage{
    \onecolumn
    \begin{tabularx}{\textwidth}{
        >{$\displaystyle}c<{$}
        >{}l<{}
        >{}p{0.45\textwidth}<{}
    }
        \multicolumn{3}{c}{Magical table goodness happens here} \\
        \round(x) & Round & Nearest integer to \( x \), that is \( \lfloor x + 0.5 \rfloor \) \\
    \end{tabularx}
    \twocolumn
}

More text happens here.
\end{document}

Essentially, what I'm trying to do, is make what amounts to a float that's two pages long, within which I can stick a longtable or something similar.

I'm open to any suggestions for alternative methods. I don't have to use this method, but it's what came to mind. (And if worse comes to worse, I'll just shove the definitions over to the very end of the paper, flip to one column, and call it an appendix.)

Best Answer

afterpage doesn't support twocolumn (I never thought anyone was going to use it at all:-) and making it do so would be quite a bit of work.

If you use \onecolumn at the point where latex would have broken the text page had there been no table, you can then add the longtable in 1-column mode, then issue \twocolumn and resume the text.

This is more hand work that desirable, but if you leave it until other document edits are done it's not so bad, and anyway sometimes that's just the way it is: the requested feature isn't unreasonable it's just not implemented...