我的文章里有tabular
以下几个。为了节省空间,我不想Step 2
占用一整行,也许把它放在左上角是tabular
个好主意……
有人知道如何实现它吗?
\documentclass[runningheads,orivec]{llncs}
\usepackage{calc}% http://ctan.org/pkg/calc
\usepackage{mathtools}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash$}p{#1}<{$}}
\begin{document}
\noindent Step 2:
\begin{center}
\begin{tabular}{lllll}
&$\begin{array}{C{\widthof{$0$}}|*{3}{C{\widthof{$-2$}}}}
& i & 0\\ \hline
i & 0 & 0 \\
0 & 0 & 0\\
\end{array}$ \quad
&$\left(\begin{array}{C{\widthof{$0$}}|*{2}{C{\widthof{$-7$}}}|*{2}{C{\widthof{$-7$}}}}
& x & \multicolumn{1}{c}{y} & i & 0 \\ \hline
x & 0 & \multicolumn{1}{c}{} & 0 & 0 \\
y & & \multicolumn{1}{c}{0} & & \\ \cline{4-5}
i & 0 & & 0 &0\\
0 & 0 & & 0 & 0
\end{array}\quad,\text{int}\right)$ \quad \quad
&$\begin{array}{C{\widthof{$0$}}|*{3}{C{\widthof{$-2$}}}}
& i & 0\\ \hline
i & 0 & 0 \\
0 & 0 & 0 \\
\end{array}$ \quad
&$\left(\begin{array}{C{\widthof{$0$}}|*{2}{C{\widthof{$-7$}}}|*{2}{C{\widthof{$-7$}}}}
& x & \multicolumn{1}{c}{y} & i & 0 \\ \hline
x & 0 & \multicolumn{1}{c}{} & 0 & 0 \\
y & & \multicolumn{1}{c}{0} & & \\ \cline{4-5}
i & 0 & & 0 &0\\
0 & 0 & & 0 & 0
\end{array}\quad ,\text{int}\right)$
\end{tabular}
\end{center}
\end{document}
答案1
...
\begin{tabular}{lllll}
& Step 2\\[-\normalbaselineskip] %%%%%%%%% new %%%%%%%%%%%%
&$\begin{array}{C{\widthof{$0$}}|*{3}{C{\widthof{$-2$}}}}
& i & 0\\ \hline
i & 0 & 0 \\
0 & 0 & 0\\
\end{array}$ \quad
...
或者作为替代方案:
Step 2\\[-\normalbaselineskip]
%% 不带&
答案2
改变
\noindent Step 2:
\begin{center}
\begin{tabular}{lllll}
到
\begin{center}
Step 2: \begin{tabular}[t]{lllll}