无法使跨两列的表格浮动

无法使跨两列的表格浮动

无论我尝试 [h]、[!h] 还是其他选项,我都无法将表 I 放在两个 lipsum 段落之间。我对 {table} 没有问题,但 {table*} 似乎不尊重定位选项?

PS:请原谅/忽略我目前使用的超大套装。非常欢迎您对套装发表评论。

\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}

答案1

无需使用table*环境:只需稍加规划,两个“宽”表实际上都可以放入一列中。请注意,通过摆脱大量垂直规则,可以节省相当多的水平空间。

我不得不说,你加载的许多软件包都是过时的和/或有害的。例如,你应该不是使用文档类时加载caption和包。subcaptionIEEEtran

在此处输入图片描述

\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}

相关内容