latexarticle

Problem in twocolumn article below table in latex


I faced a problem writing a twocolumn article in latex. I incorporated a regular table in singlecolumn mode, but when i change it back to doublecolumn below the table, when the text or the proof is large enough to start the second column, it goes over the table , which means that the second column starts at the beginning of the page as if the table doesnt exist. I left as comments the commands that i tried but didnt work. thank you for your time.

\documentclass[10pt,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[greek,english]{babel}
\usepackage{alphabeta}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tabularx}
%\usepackage{wraptable}
%\usepackage{wrapfig}
%\usepackage{graphicx}
\usepackage{multicol}
\usepackage{makecell}
\usepackage{amsthm}
%\addto\captionsenglish{
%   \renewcommand{\contentsname}{Ξ Ξ΅ΟΞΉΞ΅ΟΟμΡνα}
%       }
\newenvironment{absolutelynopagebreak}
  {\par\nobreak\vfil\penalty0\vfilneg
       \vtop\bgroup}
              {\par\xdef\tpd{\the\prevdepth}\egroup
                        \prevdepth=\tpd}
\author{text}
\title{text}
\date{5/4/2021}
\begin{document}
\maketitle
\section{text}
\par
text
\section{text}
\par
text
\section{text}
\par
text
\section{text}
\par
text
%\newpage
%\begin{absolutelynopagebreak}
\onecolumn
%\end{absolutelynopagebreak}
%\begin{wrapfig}
\begin{table}[t]
\caption{text}
\centering
\begin{tabular}{|m{4cm}|m{4cm}|m{5cm}|}
\hline
text & text & text\\
\hline
text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & text\\
\hline
text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & text\\
\hline
text & text & \makecell{text \\ text}\\
\hline
text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & \makecell{text\\text}\\
\hline
\end{tabular}
\end{table}
%\hrulefill
%\vspace{1cm}
\begin{absolutelynopagebreak}
\twocolumn
\end{absolutelynopagebreak}
\section{text}
%   \vspace{10cm}
%\hrulefill
%\clearpage
%   {\Large \textbf{5\hskip 0.6cm \selectlanguage{greek} text \textlatin{Maxwell}}}
%\par
\begin{proof}
\begin{equation}
equation
\end{equation}
\begin{equation}
equation
\end{equation}
\begin{equation}
equation
\end{equation}
\begin{equation}
equation
\end{equation}
\end{proof}
\\
text
%\end{wrapfig}
\end{document}

Solution

  • Instead of explicitly switching the text from one column to two columns back and forth within a page, you can use the starred (*) version of the table environment. That will make this table one-column, while the text stays as it is.

    \documentclass[10pt,twocolumn]{article}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage[greek,english]{babel}
    \usepackage{alphabeta}
    \usepackage{amsmath}
    \usepackage{amssymb}
    \usepackage{tabularx}
    \usepackage{multicol}
    \usepackage{makecell}
    \usepackage{amsthm}
    \usepackage{lipsum}
    
    \author{text}
    \title{text}
    \date{5/4/2021}
    \begin{document}
    \maketitle
    \section{text}
    \par
    text
    \section{text}
    \par
    text
    \section{text}
    \par
    text
    \section{text}
    \begin{table*}[t]
    \caption{text}
    \centering
    \begin{tabular}{|m{4cm}|m{4cm}|m{5cm}|}
    \hline
    text & text & text\\
    \hline
    text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & text\\
    \hline
    text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & text\\
    \hline
    text & text & \makecell{text \\ text}\\
    \hline
    text & \parbox{3cm}{\begin{equation*} equation \end{equation*}} & \makecell{text\\text}\\
    \hline
    \end{tabular}
    \end{table*}
    
    \lipsum[1-3]
    
    \section{text}
    
    \lipsum[1-3]
    
    \begin{proof}
    \begin{equation}
    equation
    \end{equation}
    \begin{equation}
    equation
    \end{equation}
    \begin{equation}
    equation
    \end{equation}
    \begin{equation}
    equation
    \end{equation}
    \end{proof}
    
    \lipsum[1-2]
    
    \end{document}
    

    The result: enter image description here