3

I am trying doing a tex in two columns and the content are majority tables, I want the format of the next image.

Title in One columns and then table in the left columns until the end and then continues in the right column, and where this ended, start the next table. (Like Office Word works) Concept

Question here

But the problem is, I want define where the table A can break, I want 5 rows together. or avoid one alone row in the second column. (That is easy only set the last 5 rows unbreakable)

So, this is easy with Longtable but multicols doesn't works as i want. I am searching something like \\* \nopagebreak but in xtab or supertabular.

Or another package that works.

Code

Here is my code.

Example Error

\documentclass{article}
\usepackage{xtab,multicol}
\usepackage[margin={2cm,5cm}]{geometry}
\usepackage{multirow}

\makeatletter
\let\mcnewpage=\newpage
\newcommand{\TrickSupertabularIntoMulticols}{%
  \renewcommand\newpage{%
    \if@firstcolumn
      \hrule width\linewidth height0pt
      \columnbreak
    \else
      \mcnewpage
    \fi
  }%
}
\makeatother


\begin{document}

\begin{centering}
    \Huge\textbf{{MENS}} \\
\end{centering}

\begin{multicols*}{2}

    \begin{centering}
        EVENT 1
    \end{centering}

    \TrickSupertabularIntoMulticols
    \xentrystretch{-0.1}
    \tablehead{COL A & COL B & COL C & COL D \\ \hline}
    \begin{xtabular}{l|l|c|c}
        GROUP 1 & & &    \\ 
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
        GROUP 2 & & &    \\ 
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
        GROUP 3 & & &    \\
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
        GROUP 4 & & &    \\
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\ 
        F & f & INFO & 6 \\
        GROUP 5 & & &    \\
        A & a & INFO & 1 \\ 
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        GROUP 6 & & &    \\
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
        GROUP 7 & & &    \\
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
    \end{xtabular}

    \begin{centering}
        EVENT 2
    \end{centering}

    \TrickSupertabularIntoMulticols
    \tablehead{COL A & COL B & COL C & COL D \\ \hline}
    \begin{xtabular}{l|l|c|c}
        GROUP 1 & & &  \\ 
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
        GROUP 2 & & &    \\ 
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
        GROUP 3 & & &    \\
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
        GROUP 4 & & &    \\
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\ 
        F & f & INFO & 6 \\
        GROUP 5 & & &  \\
        A & a & INFO & 1 \\ 
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
        GROUP 6 & & &    \\
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
        GROUP 7 & & &    \\
        A & a & INFO & 1 \\
        B & b & INFO & 2 \\
        C & c & INFO & 3 \\
        D & d & INFO & 4 \\
        E & e & INFO & 5 \\
        F & f & INFO & 6 \\
    \end{xtabular}
\end{multicols*}
\end{document} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.