1

I am unable to get Table I in between the two lipsum paragraph no matter I tried [h], [!h], and other options. I have no problem w/ {table} but {table*} seems not respecting the options of positioning?

PS: Pls forgive/ignore the oversized pkg suit which is the current set I'm using. You are very welcome to comment on the pkg set.

\documentclass[journal]{IEEEtran}

%\usepackage[retainorgcmds]{IEEEtrantools}
%\usepackage{bibentry}  
\usepackage{xcolor,soul,framed} %,caption
\usepackage{verbatim} 
\usepackage{cite}

\colorlet{shadecolor}{yellow}
% \usepackage{color,soul}
\usepackage[pdftex]{graphicx}
\graphicspath{{./pdf/}{./photo/}}
\DeclareGraphicsExtensions{.pdf,.jpeg,.png}

\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}
\MakeOuterQuote{"}

\usepackage[cmex10]{amsmath}
%Mathabx do not work on ScribTex => Removed
%\usepackage{mathabx}
\usepackage{array}
\usepackage{mdwmath}
% \usepackage{mdwtab}
\usepackage{eqparbox}
\usepackage{url}
\usepackage[ruled,vlined]{algorithm2e}
\usepackage{tikz-cd}
\tikzcdset{diagrams={nodes={inner sep=1pt}}}
\usepackage{tikz}
\usetikzlibrary{arrows,
    positioning,
    overlay-beamer-styles,
    shapes.geometric,
    decorations.text}
\usepackage{appendix}

\usepackage{adjustbox}

\usetikzlibrary{matrix,arrows,decorations.pathmorphing}

\hyphenation{op-tical net-works semi-conduc-tor}

%\bstctlcite{IEEE:BSTcontrol}
\newtheorem{theorem}{Theorem}
\newtheorem{defn}{Definition}[section]
\DeclareMathOperator*{\argmax}{arg\,max}

% extra packages
\usepackage{caption}
\usepackage{subcaption}
\usepackage{adjustbox}
\def \subFigJustEye{0.4\textwidth}
\def \subFigJust{0.55\textwidth}%this actually defines the justification. The previous name is "subFigJust"
\def \subGraphWidth{0.7\linewidth}
\def \FigWidth{80mm}%80mm is too large. 0. 7\linewidth is recommended. 
% \captionsetup[figure]{justification=raggedright,singlelinecheck=false,font=small,labelfont={},name={Fig. },labelsep=period}
% \captionsetup[subfigure]{justification=centering,font=small}
% \usepackage{balance}
% \usepackage{microtype}
\usepackage{listings}
% \usepackage{subfig}
% strike through elements in MA
\usepackage{pst-node}
\usepackage{auto-pst-pdf}
% strike through text
\usepackage{cancel}
%% One column equation
\usepackage{mathtools,amssymb,lipsum}%lipsum: filler text. 
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\usepackage{cuted}
\setlength\stripsep{3pt plus 1pt minus 1pt}

%% Braces over matrix
\usepackage{tikz-cd}
\tikzcdset{diagrams={nodes={inner sep=1pt}}}
% \usepackage{tikz}
\usetikzlibrary{arrows,
                positioning,
                overlay-beamer-styles,
                shapes.geometric,
                decorations.text}
% \usepackage{appendix}
\usepackage{caption}
\usepackage{subcaption}
% \usepackage{adjustbox}
% \usepackage[cal=mt,scr=kp]{mathalpha}
% \usepackage{bm}
% \usepackage{stackengine}
\usepackage{cases}
\usepackage{nicematrix}
\DeclareMathOperator{\co}{co}
% restore pdf in dark theme
%  \usepackage{xcolor}
% \pagecolor[rgb]{0,0,0} %black
% \color[rgb]{0.5,0.5,0.5} %grey 
\usepackage{matlab-prettifier}
\usepackage{float}

%=== TITLE & AUTHORS ====================================================================
\begin{document}
\bstctlcite{IEEEexample:BSTcontrol}

\section{Introduction}  
\lipsum[1]

\begin{table*}[!h]
\caption{EH, EW, RHM, RWM, and REM of Ch1, Ch2, and Ch3}
    \centering
    \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}
    \hline
        Channel & EH_{sub1} (mV) & EW_{sub1} (ps) & EH_{sub2} (mV) & EW_{sub2} (ps) & EH_{sub3} (mV) & EW_{sub3} (ps) & RHM & RWM & REM \\ \hline
        1 & 61.20 & 31.64 & 64.28 & 32.96 & 57.76 & 31.64 & 0.107 & 0.041 & 0.074 \\ \hline
        2 & 62.49 & 32.96 & 64.36 & 32.96 & 58.33 & 32.96 & 0.098 & 0.000 & 0.049 \\ \hline
        3 & 22.36 & 23.73 & 66.05 & 29.00 & 28.59 & 26.37 & 1.120 & 0.200 & 0.660 \\ \hline
    \end{tabular}
    \label{tab:ch123_rem}
\end{table*}

\lipsum[1]

\begin{table*}[h]
\caption{EH, EW, RHM, RWM, and REM of Ch4, and Ch5}
    \centering
    \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}
    \hline
       Channel & EH_{sub1} (mV) & EW_{sub1} (ps) & EH_{sub2} (mV) & EW_{sub2} (ps) & EH_{sub3} (mV) & EW_{sub3} (ps) & RHM & RWM & REM \\ \hline
        4 & 404.98 & 35.60 & 466.00 & 36.91 & 462.35 & 35.60 & 0.137 & 0.036 & 0.087  \\ \hline
        5 & 359.85 & 35.60 & 371.36 & 35.60 & 369.36 & 35.60 & 0.031 & 0.000 & 0.016  \\ \hline
    \end{tabular}
    \label{tab:ch45_rem}
\end{table*}
% \begin{table*}[!h]
% \caption{EH, EW, RHM, RWM, and REM of Ch4, and Ch5}
%     \centering
%     \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}
%     \hline
%        Channel & EH_{sub1} (mV) & EW_{sub1} (ps) & EH_{sub2} (mV) & EW_{sub2} (ps) & EH_{sub3} (mV) & EW_{sub3} (ps) & RHM & RWM & REM \\ \hline
%         4 & 404.98 & 35.60 & 466.00 & 36.91 & 462.35 & 35.60 & 0.137 & 0.036 & 0.087  \\ \hline
%         5 & 359.85 & 35.60 & 371.36 & 35.60 & 369.36 & 35.60 & 0.031 & 0.000 & 0.016  \\ \hline
%     \end{tabular}
%     \label{tab:ch45_rem}
% \end{table*}


%   \clearpage  
%   \section*{References}
%   \bibliography{reference}
\bibliographystyle{IEEEtran}
\bibliography{IEEEabrv,Bibliography}

\end{document}
8
  • 1
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Aug 12, 2023 at 11:42
  • 1
    spanning tables can not be inline so \begin{table*}[!h] does not allow the table anywhere as it does not allow t Aug 12, 2023 at 11:42
  • do you really use all those packages in a single article? both pstricks and tikz at the same time for example?? it's really bad idea to include packages you don't use. I would remove all the pakages, then just add them as needed Aug 12, 2023 at 11:48
  • your example produces ! LaTeX Error: Command \appendices already defined. also ! Missing $ inserted Aug 12, 2023 at 11:51
  • your example (if we ignore the error messages) has no text after the table, so there are no columns for it to span. try \documentclass[journal]{IEEEtran} \usepackage{lipsum} \begin{document} \begin{table*} \centering \begin{tabular}{c@{\hspace{4cm}}c} aa&bbb\\ aa&bbb\\ aa&bbb\\ aa&bbb\\ \end{tabular} \caption{xxx} \end{table*} \lipsum\lipsum\lipsum \end{document} Aug 12, 2023 at 11:58

1 Answer 1

2

No need to employ table* environments: With a bit of planning, both "wide" tables can actuallly be made to fit inside a column. Note that quite a bit of horizontal space can be saved by getting rid of the multitudes of vertical rules.

I can't help but remark that many of the packages you load are obsolete and/or harmful. For instance, you should not be loading the caption and subcaption packages when using the IEEEtran document class.

enter image description here

\documentclass[journal]{IEEEtran}
\usepackage[cmex10]{amsmath}
\usepackage{lipsum,booktabs}
 
\begin{document}

\section{Introduction}  
\lipsum[1][1-4]

\begin{table}[!h]
\setlength\tabcolsep{0pt} % make LaTeX figure out intercol. whitespace amounts

\caption{EH, EW, RHM, RWM, and REM of Ch1, Ch2, and Ch3}
\label{tab:ch123_rem}

\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}l *{9}{c}}
\toprule
Ch. & EH\textsubscript{sub1} & EW\textsubscript{sub1} & EH\textsubscript{sub2} & EW\textsubscript{sub2} & EH\textsubscript{sub3} & EW\textsubscript{sub3} & RHM & RWM & REM \\ 
    & (mV) & (ps) & (mV) & (ps) & (mV) & (ps) & & & \\
\midrule
1 & 61.20 & 31.64 & 64.28 & 32.96 & 57.76 & 31.64 & 0.107 & 0.041 & 0.074 \\ 
2 & 62.49 & 32.96 & 64.36 & 32.96 & 58.33 & 32.96 & 0.098 & 0.000 & 0.049 \\ 
3 & 22.36 & 23.73 & 66.05 & 29.00 & 28.59 & 26.37 & 1.120 & 0.200 & 0.660 \\ 
\bottomrule
\end{tabular*}
    
\bigskip
\caption{EH, EW, RHM, RWM, and REM of Ch4, and Ch5}
\label{tab:ch45_rem}

\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}l *{9}{c}}
\toprule
Ch. & EH\textsubscript{sub1} & EW\textsubscript{sub1} & EH\textsubscript{sub2} & EW\textsubscript{sub2} & EH\textsubscript{sub3} & EW\textsubscript{sub3} & RHM & RWM & REM \\ 
    & (mV) & (ps) & (mV) & (ps) & (mV) & (ps) & & & \\
\midrule
4 & 404.98 & 35.60 & 466.00 & 36.91 & 462.35 & 35.60 & 0.137 & 0.036 & 0.087  \\ 
5 & 359.85 & 35.60 & 371.36 & 35.60 & 369.36 & 35.60 & 0.031 & 0.000 & 0.016  \\ 
\bottomrule
\end{tabular*}
    
\end{table}

\lipsum[2][1-4]
\end{document}
2
  • 1
    Thanks so much for the super helpful answer👍 Aug 13, 2023 at 20:46
  • 1
    @ShermanChen, if answer is super helpful than you should at list upvote it or even accept it (by clicking on up-triangle and checkmark at top left side of answer)!
    – Zarko
    Sep 11, 2023 at 13:44

You must log in to answer this question.

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