0

I was asked to write an article in 2-column format, and I have a large table that contains seven columns and a large number of rows. I need the table to take the entire width of the page, and I also need it to continue to next pages. I tried many solutions, but every solution has a problem. For example, when using the longtable package i forced to convert between two columns and one column, and this causes a problem. When the table ends in the middle of a page, the rest of the page is left blank, and the rest of the article is continue at the beginning of a new page. This is an undesirable thing. I also used tabular*, but the table does not continue to the next page. Is there anyone who has an ideal solution to this problem or has a sample .tex file that contains the format I want? I attach picture as an illustration of what I wantenter image description here and second picture is the issue of empty space after the end of tableenter image description here

Edit: this is my tex code

\documentclass[fleqn,10pt]{SelfArx}
\usepackage[english]{babel} % Specify a different language here - english by default
\usepackage{lipsum} % Required to insert dummy text. To be removed otherwise
\usepackage{longtable}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{cite}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage{xtab,afterpage}
\graphicspath{ {./} }
\usepackage{fancyhdr}
\usepackage{xpatch}

\newcommand{\ignore}[1]{}
\setlength{\columnsep}{0.55cm}  text
\setlength{\fboxrule}{0.75pt} 
\begin{document}
% the content of Article in 2 column mode

\onecolumn
\begin{center}
\begin{longtable}{|l|l|l|}
  \caption[Short caption]{Long captions for the long table.} \label{tab:long1} \\
  % First head
  \hline
  \multicolumn{1}{|c|}{\textbf{Time (s)}} & 
  \multicolumn{1}{c|}{\textbf{Triple chosen}} & 
  \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\ \hline
  \endfirsthead
  % Standard head
  \multicolumn{3}{c}
  {{\tablename\ \thetable{} -- continued from previous page.}} \\
  \hline
  \multicolumn{1}{|c|}{\textbf{Time (s)}} &
  \multicolumn{1}{c|}{\textbf{Triple chosen}} &
  \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\ \hline
  \endhead
  % Footnote 
  \hline \multicolumn{3}{|r|}{{Continued on next page...}} \\ \hline
  \endfoot
  % Last footnote
  \hline
  \endlastfoot
  % The table
  col1 & col2 & col3 \\
  col1 & col2 & col3 \\
  col1 & col2 & col3 \\
  ..........................
  col1 & col2 & col3 \\
  col1 & col2 & col3 \\
  col1 & col2 & col3 \\
  col1 & col2 & col3 \\
  
\end{longtable}
\end{center}
\twocolumn

%rest of article

\end{document}
8
  • Welcome to TeX.SE! Can you please show us a short compilable TeX code resulting in your issue? Then we do not have to guess what you are doing ...
    – Mensch
    Jan 13 at 11:05
  • sorry this my first question here , i edit my question and add snapshot from code
    – IraqiEng
    Jan 13 at 11:33
  • Never, ever embed a longtable environment in a center environment.
    – Mico
    Jan 13 at 11:50
  • Please tell us if the SelfArx document class files are available online and, if so, where.
    – Mico
    Jan 13 at 11:55
  • I downloaded the template for the magazine from their site, and it contains this file SelfArx within the project files @Mico
    – IraqiEng
    Jan 13 at 12:04

1 Answer 1

1

You should provide at least an MWE so that anyone can work around on your problem.

Based on my understanding, you can use longtblr option from tabularray package to generate the table you want.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .