0

I intend to draw a long table in the IEEE template,however, I have two problems:

1- I can't adjust the width of table.

2- I can't write my text immediately after the table.

I insert my table in the \tabular format here.

Thanks for your help!

\documentclass[journal,comsoc]{IEEEtran}
\usepackage{enumitem}
\newlist{abbrv}{itemize}{1}
\setlist[abbrv,1]{label=,labelwidth=1in,align=parleft,itemsep=0.1\baselineskip,leftmargin=!}

\usepackage[withpage]{acronym}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{MnSymbol}
\usepackage{wasysym}
\usepackage{graphicx} 
\usepackage[table]{xcolor}
\usepackage{url}
\usepackage{xfrac}
\usepackage{lipsum}
\usepackage{textcomp}
\usepackage{tabularx}
\usepackage{lettrine}
%\usepackage{multicol}
 \usepackage{amsmath}
\usepackage{tabularx}
\usepackage[ampersand]{easylist}
\usepackage{multirow}
\usepackage{tikz}
\usepackage{pdflscape}
\usepackage{multirow}
\usepackage{cite}
\usepackage{longtable}
\usepackage{ctable}
\usepackage{rotating}
\usepackage{pifont}
\usepackage{ctable, fancybox}
\usepackage{bold-extra}
\usepackage{csquotes}
\usepackage{lineno,hyperref}
\usepackage{chronology}
\usepackage{array}
\usepackage{caption}
\usepackage{makecell}
\usepackage{boldline}
\usepackage{subfigure}
% \newcommand{}{}
 \newcommand{\tick}{\ding{52}}

% Insert the name of "your journal" with
% \journalname{myjournal}
%
\begin{document}

    \newcommand{\key}{\rotatebox{90}}



     \onecolumn

 \begin{footnotesize}%\setlength\tabcolsep{-17pt}% was 6

 \setlength\LTleft{-30pt}            % default: \fill
 \setlength\LTright{-30pt}           % default: \fill

            \begin{longtable}{ |c|c|c|c|c|c|c|c|c|c|c|c|}



                \cline{4-12}

                \multicolumn{3}{c|}{\multirow{2}{*}{}} & \multicolumn{6}{c|}{\large\bf Term1} &
                \multirow{2}{*}{\large\bf Term2} &\multirow{2}{*}{\large\bf Term3 }&    \multirow{2}{*}{\large\bf  Term4 }  \\ \cline{1-9}

                {\large\bf term5 }&{\large\bf term6 }&{\large\bf term7}&   {\large\bf hhh }  & {\large\bf term8 } & {\large\bf hhhhh }& {\large\bf hhh }& {\large\bf iiii } & {\large\bf hhhh } &     &  & \\ 

                {\large\bf jjjjj}& {\large\bf llllll}&  &{\large\bf rrrrrr} & {\large\bf wwwwwwwwww}& {\large\bf nnnnnnnnnnn} &{\large\bf pppppppppp} & {\large\bf pppppppppppp}& {\large\bf mmmmmmmmmmmmmmm}&   &   &   \\ \Xhline{1.8pt}

            \multirow{34}{*}{\key{\LARGE \bf qqqqqqqqqq}}& \multirow{28}{*}{ \bf qqqqqqqq} & {\large 111111}     & &&& & &   &    &   &  \\ \cline{3-12}

            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}

        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}

            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}

        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{2-12}  

            & \multirow{9}{*}{\large\bf XXXXXXXX}&{\large HHHH \cite{P6_2 ,P6}} & &&& & & & {\large WWWWW} &  &  \\ \cline{3-12} 

            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &     \\ \Xhline{1.8pt}
            \multirow{20}{*}{\key{\LARGE\bf  QQQQQQ}} &\multirow{19}{*}{\large\bf QQQQ}&    & && \large\tick& & & & {\large WQQQQ} &   & \\ \cline{3-12}

                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{2-12}

                        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                        & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{2-12}



                                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                                & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{2-12}


            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
            & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{2-12}


                    & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                    & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                    & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                    & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                    & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                    & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                    & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                    & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{3-12}
                    & & hhhhhh  & & & & & & &  & {\large yyyyyy}  &    \\ \cline{2-12}



                & {  \bf WWWWW} & \multicolumn{10}{c|}{\bf QQQQ} \\ \Xhline{1.8pt}

            \end{longtable}

 \end{footnotesize}

            \twocolumn





\end{document}
subham soni
  • 9,673
  • 1
    it would be easier to answer if you showed what you had tried with longtable, but just some general comments avoid using \resizebox on tables and you don't need \large in every cell, a single \large before the table would work. – David Carlisle Apr 06 '19 at 11:27
  • Unrelated to the issue: but please make sure that you don't load packages more than once and please also keep the correct load order of packages in mind (especially referrring to the hyperref package that should be loaded last). If I try to compile your code, I get an error message (Command\mid' already defined) that seems to be related to the MnSymbol package. – leandriis Apr 06 '19 at 13:13
  • Also unrelated, but you might want to use \textbf{} for bold text instead of \bf. See: “Correct” way to bold/italicize text? – leandriis Apr 06 '19 at 13:20
  • If you don't use resizebox your table will in its current form only fit into the textwidth of a landscape page with the font size tiny. I would therefor recommend that you take a look ath the column headers. Maybe you can add some linebreaks there to make the columns narrower. (Perhaps you could also remove repeated information?) Aditionally, you could also consider removing the first two columns and try to incorporate the information presented in them in a different way that does not need that much horizontal space. – leandriis Apr 06 '19 at 13:27

1 Answers1

0

I solved my problem! First, I have created to \tabular s, that means one table in the bottom of a page and another table in top of the next page. then, I used \caption* {....} to remove the caption of second table! so, I have a long table splitting over two pages. :)

  • See https://tex.stackexchange.com/questions/278727/split-subfigures-over-multiple-pages/278748#278748. – Zarko Aug 29 '20 at 14:33