How to prevent table to write over one column equation in twocolumn document class

equationstwo-column

My goal is to write a one-column equation in a two-column document class. I have used the following answer: https://www.researchgate.net/post/How_to_make_equation_one_column_in_two_column_paper_in_latex .

\usepackage{lipsum, mathtools, cuted}
\begin{strip}
\begin{equation}
                        Your equation goes here
\end{equation}
\end{strip}

But when I use a table in between, it overwrites the equation. Is it possible to prevent this?

My sample code:

\documentclass[twocolumn]{article}
\usepackage{color, etoolbox, lipsum, mathtools, geometry}
\usepackage{cuted, textcomp, setspace, longtable, tabularx, array}
\begin{document}
\begin{center}
    \begin{singlespace}
        \begin{tabular}{ c c c }
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
        \end{tabular}
    \end{singlespace}
\end{center}

\begin{strip}
    \[
        a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q
    \]
\end{strip}
\begin{equation}
    \begin{aligned}
        f(x)=
        \begin{cases}
            1 & \text{if}\ \text{x=0} \\
            0 & \text{otherwise}.
        \end{cases}
    \end{aligned}
\end{equation}
\end{document}

AS you can see in the output, my table merges with the whole page equation:

enter image description here

Is it possible to prevent this, where tables and the long equation won't write on top of each other?

Please note that firstly I have tried widetext from this solution: One column equation in twocolumn document class ; but I have received following error: ! LaTeX Error: File 'widetext.sty' not found.

Best Answer

Maybe using multicol is a nice and easy workaround:

\documentclass{article}
\usepackage{lipsum, mathtools}
\usepackage{setspace}
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
\lipsum[1]
\begin{center}
    \begin{singlespace}
        \begin{tabular}{ c c c }
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
            a & b & c \\
        \end{tabular}
    \end{singlespace}
\end{center}
\end{multicols}
\[
    a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q
\]
\begin{equation}
    \begin{aligned}
        f(x)=
        \begin{cases}
            1 & \text{if}\ \text{x=0} \\
            0 & \text{otherwise}.
        \end{cases}
    \end{aligned}
\end{equation}
\begin{multicols}{2}
\lipsum[1]
\end{multicols}
\end{document}

enter image description here

Of course, this is technically not a two-column document. Instead, we can just take a one-column document and add the two-column parts around basically all text that is not your equation.