1

I use the following code in single column format, and it gives the following output: output in single column

     \documentclass[review]{elsarticle}
\usepackage{blindtext}
\usepackage{graphicx}
 \usepackage{siunitx}
\usepackage{cite}
\usepackage{caption}
\usepackage{tabularx}
\usepackage{rotating}
\usepackage{adjustbox}  
\usepackage{floatrow}
\usepackage{array}
\usepackage{booktabs}
\usepackage{ltablex}
\usepackage{lineno,hyperref}
\usepackage{supertabular,booktabs}
\begin{document}

     \begin{sidewaystable*}[!htbp]
\caption{the caption here}
\label{tabRes}
\centering
{\small
\begin{tabularx}{\textwidth}{lllllllllll}
\hline
& \multicolumn{2}{p{2cm}}{column 1} & \multicolumn{2}{p{2cm}}{column 2} & \multicolumn{2}{p{2cm}}{column column 3} & \multicolumn{2}{p{2cm}}{Scolumn column 4} & \multicolumn{2}{p{3cm}}{column column column column 5  }  \\ 
      \cmidrule(l){2-3}\cmidrule(l){4-5}\cmidrule(l){6-7}\cmidrule(l){8-9}\cmidrule(l){10-11}
                       & H         & F        & H        & F       & H        & F       & H       & F       & H        & F  \\ \hline
\% ABCDEFGHIJ          & 0.11      & 3.2      & -18.3    & -1.2    & 22       & 11.15   & 8.5     & 0.8     & 202      & 8.11      \\ 
V1                     & 0.6-1    & 0.5-1.5  & 1.3-2.2  & 1-2     & 0.6-1    & 0.5-1.5 & 0.7-2.6 & 0.6-1.7 & 0.6-1    & 0.5-1.6   \\ 
V2                     & 0.05-0.7 & 0.08-0.9 & 0.05-0.6 & 0.1-0.6 & 0.05-0.7 & 0.1-0.4 & 0.1-0.7 & 0.2-0.6 & 0.05-0.5 & 0.08-0.8   \\ 
R1                     & 2222     & 88       & 888      & 99992   & 11       & 222     & 3333    & 4444    & 111      & 666        \\ 
R2                     & 22 k     & 888 k    & 98 k     & 888 k   & 111 k    & 55555 M & 54 k    & 888 k   & 11.5 K   & 111.4 K     \\
B1                     & 2222     & 88       & 888      & 99992   & 11       & 222     & 3333    & 4444    & 111      & 666          \\ 

& & & & & & & & &{\small($R=$\SI{3.5}{\kilo\ohm})} &{\small($R=$\SI{7}{\kilo\ohm})} \\
P1 & 49 & 32.4     & 42.6     & 42      & 323.8    & 28.7    & 33.5    & 31.63   & 41.5     & 31            \\ 

 & & & & &{\small($I1=$\SI{2}{\micro\ampere})} &{\small($I2=$\SI{1}{\micro\ampere})} & & &  & \\ \hline

{\small$^a$ For i1 0-\SI{0.1}{\micro\ampere}.}      \\
{\small$^b$ At i2 \SI{0.2}{\micro\ampere}.}        \\


\end{tabularx}
}
\end{sidewaystable*}
 \end{document}

I need the same output in Double column format. However i get the following output:enter image description here

,while using the same code except fore "supertabular" instead of "tabularx"

    \documentclass[journal]{IEEEtran}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{cite}
 \usepackage{siunitx}
\usepackage{caption}
\usepackage{tabularx}
\usepackage{rotating}
\usepackage{adjustbox}  
\usepackage{floatrow}
\usepackage{array}
\usepackage{booktabs}
\usepackage{ltablex}
\usepackage{lineno,hyperref}
\usepackage{supertabular,booktabs}
\begin{document}

\begin{sidewaystable*}[!htbp]
\caption{caption here}
\label{tabRes}
\centering
{\small
\begin{supertabular}{lllllllllll}
\hline
& \multicolumn{2}{p{2cm}}{column 1} & \multicolumn{2}{p{2cm}}{column 2} & \multicolumn{2}{p{2cm}}{column column 3} & \multicolumn{2}{p{2cm}}{Scolumn column 4} & \multicolumn{2}{p{3cm}}{column column column column 5  }  \\ 
      \cmidrule(l){2-3}\cmidrule(l){4-5}\cmidrule(l){6-7}\cmidrule(l){8-9}\cmidrule(l){10-11}
                           & H         & F        & H        & F       & H        & F       & H       & F       & H        & F  \\ \hline
\% ABCDEFGHIJ          & 0.11      & 3.2      & -18.3    & -1.2    & 22       & 11.15   & 8.5     & 0.8     & 202      & 8.11      \\ 
V1                         & 0.6-1    & 0.5-1.5  & 1.3-2.2  & 1-2     & 0.6-1    & 0.5-1.5 & 0.7-2.6 & 0.6-1.7 & 0.6-1    & 0.5-1.6   \\ 
V2                     & 0.05-0.7 & 0.08-0.9 & 0.05-0.6 & 0.1-0.6 & 0.05-0.7 & 0.1-0.4 & 0.1-0.7 & 0.2-0.6 & 0.05-0.5 & 0.08-0.8   \\ 
R1                         & 2222     & 88       & 888      & 99992   & 11       & 222     & 3333    & 4444    & 111      & 666        \\ 
R2                         & 22 k     & 888 k    & 98 k     & 888 k   & 111 k    & 55555 M & 54 k    & 888 k   & 11.5 K   & 111.4 K     \\
B1                     & 2222     & 88       & 888      & 99992   & 11       & 222     & 3333    & 4444    & 111      & 666          \\ 

& & & & & & & & &{\small($R=$\SI{3.5}{\kilo\ohm})} &{\small($R=$\SI{7}{\kilo\ohm})} \\
P1 & 49 & 32.4     & 42.6     & 42      & 323.8    & 28.7    & 33.5    & 31.63   & 41.5     & 31            \\ 

 & & & & &{\small($I1=$\SI{2}{\micro\ampere})} &{\small($I2=$\SI{1}{\micro\ampere})} & & &  & \\ \hline

{\small$^a$ For i1 0-\SI{0.1}{\micro\ampere}.}      \\
{\small$^b$ At i2 \SI{0.2}{\micro\ampere}.}        \\



\end{supertabular}
}
\end{sidewaystable*}
 \end{document}
  • 1
    Your second piece of code does not compile. It shows error messages in the line of, Undefined control sequence ... \SI, Undefined control sequence....\kilo. Don't you need to make it sure that the code compiles and people will feel interested to contribute? – Masroor Aug 29 '17 at 07:58
  • I edited it, "\usepackage{siunitx}" was missing. – Bakr Hesham Aug 29 '17 at 08:01
  • As I understand, are you trying to put a double column table in a two column document? – Masroor Aug 29 '17 at 08:07
  • I need to put a multi column table "which is shown in fig1" in a double column document. – Bakr Hesham Aug 29 '17 at 08:11
  • It works by moving the code in another place in the document! – Bakr Hesham Aug 29 '17 at 09:47

1 Answers1

1
\documentclass[journal]{IEEEtran}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{siunitx}
\usepackage{caption}
\usepackage{tabularx}
\usepackage{rotating}
\usepackage{adjustbox}  
\usepackage{floatrow}
\usepackage{array}
\usepackage{booktabs}
\usepackage{ltablex}
\usepackage{lineno,hyperref}
\usepackage{supertabular,booktabs}

% For putting the float in the first page, comment out if the float is
% not needed in the first page
\usepackage{stfloats}
% For dummy text, delete this
\usepackage{lipsum}

\begin{document}

\begin{table*}[!htbp]
  \caption{caption here}
  \label{tabRes}
  \centering
  {\small
    \begin{supertabular}{lllllllllll}
      \hline
      & \multicolumn{2}{p{2cm}}{column 1} & \multicolumn{2}{p{2cm}}{column 2} & \multicolumn{2}{p{2cm}}{column column 3} & \multicolumn{2}{p{2cm}}{Scolumn column 4} & \multicolumn{2}{p{3cm}}{column column column column 5  }  \\ 
      \cmidrule(l){2-3}\cmidrule(l){4-5}\cmidrule(l){6-7}\cmidrule(l){8-9}\cmidrule(l){10-11}
      & H         & F        & H        & F       & H        & F       & H       & F       & H        & F  \\ \hline
      \% ABCDEFGHIJ          & 0.11      & 3.2      & -18.3    & -1.2    & 22       & 11.15   & 8.5     & 0.8     & 202      & 8.11      \\ 
      V1                         & 0.6-1    & 0.5-1.5  & 1.3-2.2  & 1-2     & 0.6-1    & 0.5-1.5 & 0.7-2.6 & 0.6-1.7 & 0.6-1    & 0.5-1.6   \\ 
      V2                     & 0.05-0.7 & 0.08-0.9 & 0.05-0.6 & 0.1-0.6 & 0.05-0.7 & 0.1-0.4 & 0.1-0.7 & 0.2-0.6 & 0.05-0.5 & 0.08-0.8   \\ 
      R1                         & 2222     & 88       & 888      & 99992   & 11       & 222     & 3333    & 4444    & 111      & 666        \\ 
      R2                         & 22 k     & 888 k    & 98 k     & 888 k   & 111 k    & 55555 M & 54 k    & 888 k   & 11.5 K   & 111.4 K     \\
      B1                     & 2222     & 88       & 888      & 99992   & 11       & 222     & 3333    & 4444    & 111      & 666          \\ 

      & & & & & & & & &{\small($R=$\SI{3.5}{\kilo\ohm})} &{\small($R=$\SI{7}{\kilo\ohm})} \\
      P1 & 49 & 32.4     & 42.6     & 42      & 323.8    & 28.7    & 33.5    & 31.63   & 41.5     & 31            \\ 

      & & & & &{\small($I1=$\SI{2}{\micro\ampere})} &{\small($I2=$\SI{1}{\micro\ampere})} & & &  & \\ \hline

      {\small$^a$ For i1 0-\SI{0.1}{\micro\ampere}.}      \\
      {\small$^b$ At i2 \SI{0.2}{\micro\ampere}.}        \\



    \end{supertabular}
  }
\end{table*}

\lipsum[1-10]


\end{document}

enter image description here

Masroor
  • 17,842
  • this code not giving me the output shown in your picture, this column & & & & & & & & &{\small($R=$\SI{3.5}{\kilo\ohm})} &{\small($R=$\SI{7}{\kilo\ohm})} \\is left shifted. and this column is P1 & 49 & 32.4 & 42.6 & 42 & 323.8 & 28.7 & 33.5 & 31.63 & 41.5 & 31 \\ is right shifted – Bakr Hesham Aug 29 '17 at 08:54
  • I simply compiled it and posted a screenshot. Were you careful in copy-paste? Which LaTeX compiler are you using? – Masroor Aug 29 '17 at 09:02
  • I use MikTEX compiler. – Bakr Hesham Aug 29 '17 at 09:07
  • I don't think that I can be of much assistance here. I double checked, the output is flawless in my computer. Moreover, I did not change your tabular even a single dot. – Masroor Aug 29 '17 at 09:16
  • Actually i tried it in a new document it works well, however while using the same code inside my original document that have the same packages Some shifting happens. – Bakr Hesham Aug 29 '17 at 09:26
  • Also, different cells shifting appears in the same document for the same code as i past it in different sections?! – Bakr Hesham Aug 29 '17 at 09:35