0

In IEEE Systems Journal format;

i am trying to insert a table/figure that is quite wide, so it will take up a whole column.

\documentclass[lettersize,journal]{IEEEtran}

\usepackage{tabularx}   
\usepackage{lipsum,graphicx}


\begin{document}
\lipsum[1-7]

\onecolumn
    \begin{tabularx}{\textwidth}{|X|X|X|X|}
    \hline
    \multicolumn{4}{|c|}{\textcolor{red}{\textbf{LUL }}} \\
    \hline
    \centering\arraybackslash Title & \centering\arraybackslash Overview & \centering\arraybackslash Advantage(s) & \centering\arraybackslash Disadvantage(s) \\
    \hline
    Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline   
    Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline     Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline     Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline     Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline     Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline 
    \end{tabularx}
    \twocolumn

\lipsum[1-2]

\end{document}

However, by using \onecolumn switch followed by \twocolumn switch leaves me with the following problem;

Space being left due to table

There is a lot of space left by the figure/table, as you can see the red circle i highlighted in the attached picture, which is bad for presentation and also unacceptable by my advisor. Is there any way i can fill this empty space ?

preferably by the text that will come after the table/figure ?

6
  • 1
    \onecolumn is a forced page break, so if you use that you need to move some text "by hand" to fill the space. But this is exactly why latex has a floating table environment, put the table in \begin{table*}... and it wll be inserted avoiding the bad page break. Dec 2, 2022 at 10:34
  • 1
    please fix your example so people can run it to see the issue Dec 2, 2022 at 10:36
  • @DavidCarlisle i fixed it , please check again - also, when i try by \begin{table*}.., it gets really weird. can you provide a MWE on how i can use table*` for my case. you can use my table code if you need to Dec 2, 2022 at 10:44
  • 1
    you should clean up your preamble,why load graphicx 3 times for example? Dec 2, 2022 at 10:56
  • @DavidCarlisle yes, ofcourse. I am in a bit of a hurry right now, but i will definitely clean it up sir ! Dec 2, 2022 at 11:01

1 Answer 1

1

\onecolumn and \twocolumn are forced page breaks, so if you use them you have to move text "by hand". This is why LaTeX provides floating tables.

enter image description here

\documentclass[lettersize,journal]{IEEEtran}

\usepackage{float}
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage[ruled]{algorithm2e} % allows algorithms to be displayed PROPERLY, so use with algorithmic package
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{pstricks}
\usepackage{calc}
\usepackage{ifthen}
\usepackage{msc}
\usepackage{tabularx}
\usepackage{newtxtext,newtxmath} % this pkg allowed words inside msc diagrams to be bold !
\usepackage{afterpage}
\usepackage{rotating}
\usepackage{array}
\usepackage{xcolor}

\usepackage{cuted}

\usepackage{wrapfig}
\usepackage{graphicx}

% \usepackage{lmodern,babel,adjustbox,booktabs,multirow}

\usepackage{lipsum,graphicx}
\usepackage{cuted}


\begin{document}
\lipsum[1-7]



\begin{table*}
    \begin{tabularx}{\textwidth}{|X|X|X|X|}
    \hline
    \multicolumn{4}{|c|}{\textcolor{red}{\textbf{LUL }}} \\
    \hline
    \centering\arraybackslash Title & \centering\arraybackslash Overview & \centering\arraybackslash Advantage(s) & \centering\arraybackslash Disadvantage(s) \\
    \hline
    Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline   
    Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline     Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline     Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline     Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline     Duis leo. & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna  & Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna \\ \hline 
    \end{tabularx}
\end{table*}

\lipsum

\lipsum

\end{document}
1
  • MASSIVE THANKS for this amazing help !! Dec 2, 2022 at 11:01

You must log in to answer this question.

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