我怎样才能更改桌子的数量?

我怎样才能更改桌子的数量?

我如何更改表格的数量?意味着不自动编号。 在此处输入图片描述

因为排版编号错误,所以想修改这个表格的编号,比如表格编号1\2\3\4,我想改成1\3\2\4,只要修改一两个表格编号就可以了。

我的代码:

\documentclass[letterpaper, 10 pt, conference]{ieeeconf} 
\usepackage{url}
\usepackage{array,tabularx}
\usepackage{multirow}
\usepackage{multicol, nonfloat}  %% for two columns. NEVER REMOVE!!
\usepackage{bm}
\usepackage{amsmath}

\allowdisplaybreaks

\begin{document}

\begin{table}[H]
\caption{Rules of selecting $e_{q}$.}\label{tab:1}
\centering%
{\footnotesize
\begin{tabularx}{\columnwidth}
{|m{42pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|}
\hline
$L_{i}$& $E_{M_{0}}$ < - $E_{M}^{T}$ & $|E_{M_{0}}|\leq E_{M}^{T}$ & $|E_{M_{0}}| > E_{M}^{T}$ \\ \hline
$L_{3} \& L_{4} $& $e_{5}$ & $e_{3}$ & $-$ \\ \hline
$L_{1}$& $e_{3}$ & $e_{1}$ & $e_{2}$ \\ \hline
$L_{2}$& $e_{1}$ & $e_{1}$ & $e_{2}$ \\ \hline
$L_{5}$& $-$ & $e_{2}$ & $e_{4}$ \\ \hline
$L_{6}$& $-$ & $e_{4}$ & $e_{4}$ \\ \hline
\end{tabularx}
}
\end{table}

\begin{table}[H]
\caption{Rules of selecting $e_{q}$.}\label{tab:3}
\centering%
{\footnotesize
\begin{tabularx}{\columnwidth}
{|m{42pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|}
\hline
$L_{i}$& $E_{M_{0}}$ < - $E_{M}^{T}$ & $|E_{M_{0}}|\leq E_{M}^{T}$ & $|E_{M_{0}}| > E_{M}^{T}$ \\ \hline
$L_{3} \& L_{4} $& $e_{5}$ & $e_{3}$ & $-$ \\ \hline
$L_{5}$& $-$ & $e_{2}$ & $e_{4}$ \\ \hline
$L_{6}$& $-$ & $e_{4}$ & $e_{4}$ \\ \hline
\end{tabularx}
}
\end{table}

\begin{table}[H]
\caption{Rules of selecting $e_{q}$.}\label{tab:2}
\centering%
{\footnotesize
\begin{tabularx}{\columnwidth}
{|m{42pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|}
\hline
$L_{i}$& $E_{M_{0}}$ < - $E_{M}^{T}$ & $|E_{M_{0}}|\leq E_{M}^{T}$ & $|E_{M_{0}}| > E_{M}^{T}$ \\ \hline
$L_{3} \& L_{4} $& $e_{5}$ & $e_{3}$ & $-$ \\ \hline
$L_{6}$& $-$ & $e_{4}$ & $e_{4}$ \\ \hline
\end{tabularx}
}
\end{table}

\begin{table}[H]
\caption{Rules of selecting $e_{q}$.}\label{tab:4}
\centering%
{\footnotesize
\begin{tabularx}{\columnwidth}
{|m{42pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|}
\hline
$L_{i}$& $E_{M_{0}}$ < - $E_{M}^{T}$ & $|E_{M_{0}}|\leq E_{M}^{T}$ & $|E_{M_{0}}| > E_{M}^{T}$ \\ \hline
$L_{3} \& L_{4} $& $e_{5}$ & $e_{3}$ & $-$ \\ \hline
$L_{1}$& $e_{3}$ & $e_{1}$ & $e_{2}$ \\ \hline
$L_{2}$& $e_{1}$ & $e_{1}$ & $e_{2}$ \\ \hline
\end{tabularx}
}
\end{table}

\end{document}

有人可以帮忙吗?谢谢

答案1

这是实现这一目标的一种可能性。

\documentclass[letterpaper, 10 pt, conference]{ieeeconf} 
\usepackage{url}
\usepackage{array,tabularx}
\usepackage{multirow}
\usepackage{multicol, nonfloat}  %% for two columns. NEVER REMOVE!!
\usepackage{bm}
\usepackage{amsmath}
\usepackage{float}

\allowdisplaybreaks

\begin{document}

\begin{table}[H]
\caption{Rules of selecting $e_{q}$.}\label{tab:1}
\centering%
{\footnotesize
\begin{tabularx}{\columnwidth}
{|m{42pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|}
\hline
$L_{i}$& $E_{M_{0}}$ < - $E_{M}^{T}$ & $|E_{M_{0}}|\leq E_{M}^{T}$ & $|E_{M_{0}}| > E_{M}^{T}$ \\ \hline
$L_{3} \& L_{4} $& $e_{5}$ & $e_{3}$ & $-$ \\ \hline
$L_{1}$& $e_{3}$ & $e_{1}$ & $e_{2}$ \\ \hline
$L_{2}$& $e_{1}$ & $e_{1}$ & $e_{2}$ \\ \hline
$L_{5}$& $-$ & $e_{2}$ & $e_{4}$ \\ \hline
$L_{6}$& $-$ & $e_{4}$ & $e_{4}$ \\ \hline
\end{tabularx}
}
\end{table}
\addtocounter{table}{1}

\begin{table}[H]
\caption{Rules of selecting $e_{q}$.}\label{tab:3}
\centering%
{\footnotesize
\begin{tabularx}{\columnwidth}
{|m{42pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|}
\hline
$L_{i}$& $E_{M_{0}}$ < - $E_{M}^{T}$ & $|E_{M_{0}}|\leq E_{M}^{T}$ & $|E_{M_{0}}| > E_{M}^{T}$ \\ \hline
$L_{3} \& L_{4} $& $e_{5}$ & $e_{3}$ & $-$ \\ \hline
$L_{5}$& $-$ & $e_{2}$ & $e_{4}$ \\ \hline
$L_{6}$& $-$ & $e_{4}$ & $e_{4}$ \\ \hline
\end{tabularx}
}
\end{table}

\addtocounter{table}{-2}

\begin{table}[H]
\caption{Rules of selecting $e_{q}$.}\label{tab:2}
\centering%
{\footnotesize
\begin{tabularx}{\columnwidth}
{|m{42pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|}
\hline
$L_{i}$& $E_{M_{0}}$ < - $E_{M}^{T}$ & $|E_{M_{0}}|\leq E_{M}^{T}$ & $|E_{M_{0}}| > E_{M}^{T}$ \\ \hline
$L_{3} \& L_{4} $& $e_{5}$ & $e_{3}$ & $-$ \\ \hline
$L_{6}$& $-$ & $e_{4}$ & $e_{4}$ \\ \hline
\end{tabularx}
}
\end{table}

\addtocounter{table}{1}
\begin{table}[H]
\caption{Rules of selecting $e_{q}$.}\label{tab:4}
\centering%
{\footnotesize
\begin{tabularx}{\columnwidth}
{|m{42pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|m{46pt}<{\centering}|}
\hline
$L_{i}$& $E_{M_{0}}$ < - $E_{M}^{T}$ & $|E_{M_{0}}|\leq E_{M}^{T}$ & $|E_{M_{0}}| > E_{M}^{T}$ \\ \hline
$L_{3} \& L_{4} $& $e_{5}$ & $e_{3}$ & $-$ \\ \hline
$L_{1}$& $e_{3}$ & $e_{1}$ & $e_{2}$ \\ \hline
$L_{2}$& $e_{1}$ & $e_{1}$ & $e_{2}$ \\ \hline
\end{tabularx}
}
\end{table}

\end{document}

在此处输入图片描述

答案2

您可以使用以下复杂的方式将计数器设置table为您需要的任何值:

在此处输入图片描述

\documentclass{article}

\usepackage{etoolbox}
\AtEndEnvironment{table}
  {\ifcsname oldtablenum\endcsname
    \setcounter{table}{\oldtablenum}%
   \fi
   \global\let\oldtablenum\undefined}
\newcommand{\setnexttablenumber}[1]{%
  \edef\oldtablenum{\thetable}%
  \setcounter{table}{\numexpr#1-1}}

\begin{document}

\begin{table}
  \caption{A table caption}
\end{table}

\setnexttablenumber{7}
\begin{table}
  \caption{Another table caption}
\end{table}

\begin{table}
  \caption{Another table caption}
\end{table}

\mbox{}

\end{document}

其思想是\setnexttablenumber{<num>}为下一个表的设置适当的数字\caption。编号将在下一个表的末尾恢复table

但是,如果你对编号方式有完整的想法,你可以使用

在此处输入图片描述

\documentclass{article}

\renewcommand{\thetable}{%
  \ifcase\value{table}
    0\or % 0
    1\or % 1
    3\or % 2
    2\else % 3
    \arabic{table}% 4...
  \fi
}

\begin{document}

\begin{table}
  \caption{A table caption}
  \caption{Another table caption}
  \caption{Another table caption}
  \caption{A final table caption}
\end{table}

\end{document}

更快捷的方法是\thetable根据需要直接在table环境内进行调整,而不考虑实际的计数器:

在此处输入图片描述

\documentclass{article}

\begin{document}

\begin{table}
  \caption{A table caption}
  \begingroup
  \renewcommand{\thetable}{3}%
  \caption{Another table caption}
  \endgroup
  \begingroup
  \renewcommand{\thetable}{2}%
  \caption{Another table caption}
  \endgroup
  \caption{A final table caption}
\end{table}

\end{document}

相关内容