因为排版编号错误,所以想修改这个表格的编号,比如表格编号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}