我写了下表:
\begin{center}
\begin{tabular}{c|c c c c c}
$\bigoplus$ & 0 & 1 & 2 & 3 & 4\\
\hline
0 & 0 & 1 & 2 & 3 & 4\\
1 & 1 & 2 & 3 & 4 & 0\\
2 & 2 & 3 & 4 & 0 & 1\\
3 & 3 & 4 & 0 & 1 & 2\\
4 & 4 & 0 & 1 & 2 & 3\\
\end{tabular}
\quad
\begin{tabular}{c|c c c c c}
$\bigodot$ & 0 & 1 & 2 & 3 & 4\\
\hline
0 & 0 & 0 & 0 & 0 & 0\\
1 & 0 & 1 & 2 & 3 & 4\\
2 & 0 & 2 & 4 & 1 & 3\\
3 & 0 & 3 & 1 & 4 & 2\\
4 & 0 & 4 & 3 & 2 & 1\\
\end{tabular}
\end{center}
我想将我的第一个表命名为 9.1,将第二个表命名为 9.2,我该怎么做,请帮帮我
答案1
像这样?
\documentclass{article}
\renewcommand\thetable{\thesection.\arabic{table}}
\begin{document}
\setcounter{section}{8} % for this example only
\section{tables}
\begin{table}[ht]
\begin{minipage}{0.48\linewidth}
\centering
\caption{Caption 1 text}
\label{tab:a}
\begin{tabular}{c|c c c c c}
$\bigoplus$ & 0 & 1 & 2 & 3 & 4\\
\hline
0 & 0 & 1 & 2 & 3 & 4\\
1 & 1 & 2 & 3 & 4 & 0\\
2 & 2 & 3 & 4 & 0 & 1\\
3 & 3 & 4 & 0 & 1 & 2\\
4 & 4 & 0 & 1 & 2 & 3\\
\end{tabular}
\end{minipage}
\hfill
\begin{minipage}{0.48\linewidth}
\caption{Caption 2 text}
\label{tab:b}
\centering
\begin{tabular}{c|c c c c c}
$\bigodot$ & 0 & 1 & 2 & 3 & 4\\
\hline
0 & 0 & 0 & 0 & 0 & 0\\
1 & 0 & 1 & 2 & 3 & 4\\
2 & 0 & 2 & 4 & 1 & 3\\
3 & 0 & 3 & 1 & 4 & 2\\
4 & 0 & 4 & 3 & 2 & 1\\
\end{tabular}
\end{minipage}
\end{table}
\end{document}