\begin{document}
\begin{sidewaystable}
% Table generated by Excel2LaTeX from sheet 'Sheet1'
%\begin{tabular}{c|l|r|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\begin{tabular}{|p{15mm}|l|c|l|c|l|l|l|c|l|l|l|c|l|l|l|l|l|c|l|l|l|l|l|l|l|} \hline
\multicolumn{2}{|l}{k} & \multicolumn{ 2}{|l|}{1} & \multicolumn{4}{|l}{2} & \multicolumn{4}{|l|}{3} & \multicolumn{6}{|l}{4} & \multicolumn{6}{|l}{5} & $cdots$&255 \\ \hline
\multicolumn{2}{|l|}{$|b|=log_2(k)$} & \multicolumn{ 2}{l|}{0} & \multicolumn{4}{l|}{1} & \multicolumn{ 4}{l|}{1.58} & \multicolumn{6}{|l|}{2} & \multicolumn{ 6}{c}{2.32} &$codts$ 7.99 \\ \hline
\cline{1-3}
\multicolumn{1}{|l|}{$\vert{b}\rvert$}\ &\multicolumn{1}{c}{DE} & \multicolumn{1}{|c}{0} & \multicolumn{1}{|c}{NA} &\multicolumn{1}{|c|}{1} & Possibility of bits & 0&1 & \multicolumn{1}{|c|}{1} & Possibility of bits & 0 & 1 & \multicolumn{1}{c|}{2} & Possibilty of bits & 0& 1 &10 &11 &\multicolumn{ 1}{c}{2} & Possibility of bits & 0 & 1 &10 &11 & & \\ \hline
\multicolumn{ 1}{|c}{} & \multicolumn{ 1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{ 1}{|c}{} & \multicolumn{1}{|c}{}&DE &10 &11 & \multicolumn{1}{c}{} & DE & 10 &11 & \multicolumn{1}{|c}{} & DE & 20 & 21&22&23&\multicolumn{ 1}{c}{}&DE&20&21&22 & 23 & $cdots$& \\\hline
\end{tabular}
\end{sidewaystable}
\end{document}
请建议如何合并横向表格,因为缺少某些部分。我该如何解决这个问题?请提出建议。我是 Latex 的新手。
答案1
- 从我的模板开始。
- 用您的内容逐个替换单元格。
- 每次单元格改变后进行编译。
- 我认为您的表格很宽 - 它能放在一页上吗?:=)
- 我数了一下,有 26 列。
\documentclass{article}
\begin{document}
\begin{table}
\caption{Caption of Table}
\label{tab:ExampleTable}
\begin{tabular}{|c|l|c|l|c|l|l|l|c|l|l|l|c|l|l|l|l|l|c|l|l|l|l|l|l|l|}
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 \\
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 \\
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 \\
\hline
\end{tabular}
\end{table}
\end{document}
评论后编辑
\documentclass{article}
\begin{document}
\begin{table}
\caption{Caption of Table}
\label{tab:ExampleTable}
\begin{tabular}{|c|l|c|l|c|l|l|l|c|l|l|l|c|l|l|l|l|l|c|l|l|l|l|l|l|l|}
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 \\
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 \\
\hline
\multicolumn{2}{|c|}{1--2} & \multicolumn{4}{|c|}{3--6} & \multicolumn{4}{|c|}{7--10} & \multicolumn{6}{|c|}{11--16} & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 \\
\hline
\end{tabular}
\end{table}
\end{document}