有人知道如何固定“i”的宽度并扩展“组件”吗?可能有一个命令,但我找不到它……
这是代码示例:
\begin{table}[hbt]
\centering
\begin{tabular}{ |c|c|c|c|c| }
\hline
\multicolumn{2}{|c|}{Component $\rightarrow$} & i& 1 & 2 \\
\hline
j& \multicolumn{2}{|c|}{Process 1} & A & ZZ \\
\hline
1& \multicolumn{2}{|c|}{Process 2} & AF &AFG\\
\hline
2& \multicolumn{2}{|c|}{This is a very long line...} & AX & ALA \\
\hline
\end{tabular}
\label{tab:label}
\end{table}
非常感谢!!
答案1
\documentclass[a4paper]{article}
\begin{document}
\begin{tabular}{ |c|c|c|c|c| }
\hline
\multicolumn{3}{|c|}{Component $\rightarrow$ \hfill\vrule\hspace{\tabcolsep}i} & 1 & 2 \\
\hline
j& \multicolumn{2}{|c|}{Process 1} & A & ZZ \\
\hline
1& \multicolumn{2}{|c|}{Process 2} & AF &AFG\\
\hline
2& \multicolumn{2}{|c|}{This is a very long line...} & AX & ALA \\
\hline
\end{tabular}
\end{document}