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}

  • 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 '24 at 11:05
  • sorry this my first question here , i edit my question and add snapshot from code – IraqiEng Jan 13 '24 at 11:33
  • Never, ever embed a longtable environment in a center environment. – Mico Jan 13 '24 at 11:50
  • Please tell us if the SelfArx document class files are available online and, if so, where. – Mico Jan 13 '24 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 '24 at 12:04
  • You wrote, "I downloaded the template for the magazine from their site". Whose site? (If you think I have psychic divination powers, I'm afraid I'll have to bitterly disappoint you...) – Mico Jan 13 '24 at 12:19
  • No, not like that, but I am new here and I do not know exactly what should be included. I mean that I downloaded it from the magazine’s website itself, that is, from here. link Because the file you mentioned is so long, I did not include it here. I apologize for the lack of clarification @Mico – IraqiEng Jan 13 '24 at 12:39
  • You can (usually) switch in and out of 2 column mode using \onecolumn and \twocolumn, except that it forces a new page each time. See https://tex.stackexchange.com/questions/477188/removing-the-space-in-the-page-before-appendix/477197?r=SearchResults&s=2%7C20.3329#477197 to start in the middle of a page. Not sure what to do at the end, though. – John Kormylo Jan 13 '24 at 15:14

1 Answers1

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.