例子:
Let A = \{$\alpha$,$\beta$,$\psi$\} be a set operates on $\star$ then
\begin{table}
\centering
\begin{tabular}{l|lll}
\textbf{$\star$} & \textbf{$\alpha$} & \textbf{$\beta$} &\textbf{$\gamma$}\\
\hline
$\alpha$ & $\alpha$ & $\alpha$ & $\alpha$ \\
$\beta$ & $\beta$ & $\beta$ & $\beta$ \\
$\gamma$ & $\gamma$ & $\gamma$ & $\gamma$ \\
\end{tabular}
\end{table}
Further text.
我想删除表格前后不必要的额外间距。
答案1
table
如果不需要,请不要使用环境:
\documentclass{article}
\begin{document}
\begin{enumerate}
\item Set of an integer is closed under $+$ , $-$ , $\times$ operator.
\item Set of an integer is not closed under $/$ operator.
\end{enumerate}
Let A = \{$\alpha$,$\beta$,$\psi$\} is a set operates on $\star$ then
\begin{tabular}{l|lll}
\textbf{$\star$} & \textbf{$\alpha$} & \textbf{$\beta$} &\textbf{$\gamma$}\\
\hline
$\alpha$ & $\alpha$ &$\alpha$ &$\alpha$\\
$\beta$ & $\beta$ &$\beta$ &$\beta$\\
%\midrule
$\gamma$ & $\gamma$ &$\gamma$ &$\gamma$\\
\end{tabular}
\end{document}
如果您希望表格居中,请使用:
{\centering
\begin{tabular}{l|lll}
\textbf{$\star$} & \textbf{$\alpha$} & \textbf{$\beta$} &\textbf{$\gamma$}\\
\hline
$\alpha$ & $\alpha$ &$\alpha$ &$\alpha$\\
$\beta$ & $\beta$ &$\beta$ &$\beta$\\
%\midrule
$\gamma$ & $\gamma$ &$\gamma$ &$\gamma$\\
\end{tabular}\par}
答案2
使用
\begin{center}
\begin{tabular}{l|lll}
...
\end{tabular}
\end{center}
而不是table
环境。