\documentclass{article}
\usepackage{multirow}
\usepackage{changepage}
\usepackage{array}
\usepackage{romannum}
\usepackage{rotating}
\usepackage{calc}
\usepackage{amsmath}
\usepackage{makecell}
\usepackage{nicematrix}
\usepackage{tabu}
\usepackage{xhfill}
\usepackage{booktabs}
\begin{document}
%\begin{table}[h!]
\begin{sidewaystable}[h!]
%\begin{adjustwidth}{-4.5cm}{}
\begin{tabular}{|c|l|l|c|c|c|c|c|c|c|c|c|}
\hline
\multicolumn{6}{|l}{methods abcdefghikl } & \multicolumn{2}{c}{}&\multicolumn{4}{r|}{multimedia}\\
\multicolumn{6}{|l}{} &\multicolumn{2}{c}{}&\multicolumn{4}{r|}{}\\
\hline
%\multicolumn{4}{|c|}{} & \multicolumn{5}{c|}{}\\
\multicolumn{5}{|c|}{frsturcio} &\multicolumn{2}{c}{}&\multicolumn{5}{l|}{take the picture}\\
\multicolumn{5}{|c|}{} & \multicolumn{2}{c}{} &\multicolumn{5}{l|}{}\\
\hline
& on$-$ & \multicolumn{2}{l}{bench}&&&&&&\multicolumn{3}{l|}{kids} \\[-0.2em]
& dopal$-$ & \multicolumn{2}{l}{last}&&&&&&\multicolumn{3}{l|}{banana}\\
&test$-$ &\multicolumn{2}{l}{}& &7 &5 & 9 &8&\multicolumn{3}{l|}{paradise}\\
1&martin & \multicolumn{2}{l}{omanrtu}&&&&&&\multicolumn{3}{l|}{kostric}\\ \cline{3-12}
& & \multicolumn{2}{l}{}&&&&&&&&\\
&& \multicolumn{2}{l}{name}&& 8&9 & 10 &25 & 90 & 15 & 20\\
&& \multicolumn{2}{l}{apple}&&&&&&9&8&7\\ \cline{2-12}
&\multicolumn{4}{c|}{}&&&&&&&\\
&\multicolumn{4}{c|}{mk}&15&12&7&4&2&1&0\\
\hline
\multirow{2}{*}{} & \multicolumn{3}{l}{} & & & & & &\multicolumn{3}{c|}{}\\
\multirow{2}{*}{2} & \multicolumn{3}{l}{network} & & 5 & 7 & 6 & 4 &\multicolumn{3}{c|}{3}\\ \cline{2-12}
\multirow{2}{*}{} & \multicolumn{3}{l}{} & & & & & &\multicolumn{3}{c|}{}\\
\multirow{2}{*}{}& \multicolumn{3}{c}{jk} &&20&17&13&8&\multicolumn{3}{c|}{3}\\
\hline
\multirow{2}{*}{} & \multicolumn{3}{l}{} & & & & & &\multicolumn{3}{c|}{}\\
\multirow{2}{*}{3} & \multicolumn{3}{l}{nylon} & & 8 & 7& 5& 5 &\multicolumn{3}{c|}{4}\\ \cline{2-12}
\multirow{2}{*}{}& \multicolumn{3}{c}{} &&&&&&\multicolumn{3}{c|}{}\\
\multirow{2}{*}{}& \multicolumn{3}{c}{pi} &&30&25&20&10&\multicolumn{3}{c|}{5}\\
\hline
&\multicolumn{3}{c}{}& &\multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{poteqa} &\multicolumn{1}{l|}{lno}& \multicolumn{1}{l|}{last} &\multicolumn{3}{l|}{multicolour}\\
&\multicolumn{3}{c}{}& &\multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy}& \multicolumn{1}{l|}{mjkouy}& \multicolumn{1}{l|}{fmjkouy} &\multicolumn{3}{l|}{mjkouy}\\
&\multicolumn{3}{c}{}& &\multicolumn{1}{l|}{mjkouy}& \multicolumn{1}{l|}{mjkouy} &\multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{omjkouy} &\multicolumn{3}{l|}{mjkouy}\\
&\multicolumn{3}{c}{}& &\multicolumn{1}{l|}{mjkouy}& \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} &\multicolumn{3}{l|}{mjkouy}\\
&\multicolumn{3}{c}{}& &\multicolumn{1}{l|}{mjkouy}& \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} &\multicolumn{3}{l|}{mjkouy}\\
&\multicolumn{3}{l}{mjkouy}& &\multicolumn{1}{l|}{mjkouy}& \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} &\multicolumn{3}{l|}{mjkouy mjkouy}\\
4 &\multicolumn{3}{l}{}& &\multicolumn{1}{l|}{mjkouy}& \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{mjkouy} &\multicolumn{3}{l|}{}\\
&\multicolumn{3}{l}{}& &\multicolumn{1}{l|}{}& \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{1mjkouy} &\multicolumn{3}{l|}{}\\
&\multicolumn{3}{l}{}& &\multicolumn{1}{l|}{}& \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{mjkouy} &\multicolumn{3}{l|}{}\\
&\multicolumn{3}{l}{}& &\multicolumn{1}{l|}{}& \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{mjkouy} &\multicolumn{3}{l|}{}\\ \cline{2-12}
&\multicolumn{4}{c|}{}&&&&&\multicolumn{3}{c|}{}\\
&\multicolumn{4}{c|}{pp}&25&20&12&6&\multicolumn{3}{c|}{0}\\
\hline
&&\multicolumn{2}{l}{}& &\multicolumn{2}{c|}{\multirow{2}{*}{}} & \multirow{2}{*}{}& \multirow{2}{*}{} &\multicolumn{3}{c|}{\multirow{2}{*}{}} \\
&&\multicolumn{2}{l}{mjkouy}& &\multicolumn{2}{c|}{\multirow{2}{*}{mjkouy}} & \multirow{2}{*}{mjkouy}& \multirow{2}{*}{mjkouy} &\multicolumn{3}{c|}{\multirow{2}{*}{mjkouy}}\\
&&\multicolumn{2}{l}{mjkouy}& &\multicolumn{2}{c|}{\multirow{2}{*}{}} & \multirow{2}{*}{}& \multirow{2}{*}{} &\multicolumn{3}{c|}{\multirow{2}{*}{oman}} \\ \cline{3-8} \cline{9-10} \cline{11-12}
&&\multicolumn{2}{l}{mjkouy}& &\multicolumn{2}{c|}{\multirow{1}{*}{}} & \multirow{1}{*}{}& \multirow{1}{*}{} &\multicolumn{3}{c|}{\multirow{1}{*}{}}\\
5&mjkouy$-$&\multicolumn{2}{l}{mjkouy}& &\multicolumn{2}{c|}{\multirow{1}{*}{}} & \multirow{1}{*}{}& \multirow{1}{*}{} &\multicolumn{3}{c|}{\multirow{1}{*}{}}\\
&mjkouy$-$&\multicolumn{2}{l}{mjkouy}& &\multicolumn{2}{c|}{\multirow{1}{*}{0}} & \multirow{1}{*}{0,0$-$0,2}& \multirow{1}{*}{0,2$-$0,5} &\multicolumn{3}{c|}{\multirow{1}{*}{mjkouy}}\\
&mjkouy&\multicolumn{2}{l}{mjkouy}& &\multicolumn{2}{c|}{\multirow{1}{*}{}} & \multirow{1}{*}{}& \multirow{1}{*}{} &\multicolumn{3}{c|}{\multirow{1}{*}{}}\\ \cline{3-12}
&&\multicolumn{2}{l}{}& &\multicolumn{2}{c|}{\multirow{2}{*}{}} & \multirow{2}{*}{}& \multicolumn{1}{l|}{\multirow{1}{*}{}} &\multicolumn{3}{l|}{\multirow{1}{*}{}}\\
&&\multicolumn{2}{l}{mjkouy}& &\multicolumn{2}{c|}{\multirow{2}{*}{mjkouy}} & \multirow{2}{*}{mjkouy}& \multicolumn{1}{l|}{\multirow{1}{*}{mjkouy}} &\multicolumn{3}{l|}{\multirow{1}{*}{mjkouy}}\\
&&\multicolumn{2}{l}{}& &\multicolumn{2}{c|}{\multirow{2}{*}{}} & \multirow{2}{*}{}& \multicolumn{1}{l|}{\multirow{1}{*}{mjkouy}} &\multicolumn{3}{l|}{\multirow{1}{*}{mjkouy}}\\ \cline{2-12}
&\multicolumn{4}{c|}{}&\multicolumn{2}{c|}{}&&&\multicolumn{3}{c|}{}\\
&\multicolumn{4}{c|}{I5}&\multicolumn{2}{c|}{10}&7&4&\multicolumn{3}{c|}{0}\\
\hline
&\multicolumn{3}{l}{mjkouy}& &\multirow{2}{*}{mjkouy}& \multirow{2}{*}{mjkouy} &\multirow{2}{*}{mjkouy} &\multirow{2}{*}{umjkouy} &\multicolumn{3}{l|}{\multirow{2}{*}{mjkouy}}\\
6&\multicolumn{3}{l}{mjkouy}& &\multirow{2}{*}{}& \multirow{2}{*}{} &\multirow{2}{*}{} &\multirow{2}{*}{} &\multicolumn{3}{l|}{\multirow{2}{*}{}}\\ \cline{2-12}
&&\multicolumn{2}{l}{}&&&&&&\multicolumn{3}{c|}{} \\
&&\multicolumn{2}{l}{mjkouy}&&0 &5&8&9&\multicolumn{3}{c|}{5} \\ \cline{3-12}
&&\multicolumn{2}{l}{}&&&&&&\multicolumn{3}{c|}{} \\
&pp&\multicolumn{2}{l}{mjkouy}&&0 &2&7&15&\multicolumn{3}{c|}{25} \\ \cline{3-12}
&&\multicolumn{2}{l}{}&&&&&&\multicolumn{3}{c|}{} \\
&&\multicolumn{2}{l}{mjkouy}&&0 &5&25&50&\multicolumn{3}{c|}{60} \\
\hline
\end{tabular}
%\end{adjustwidth}
%\end{table}
\end{sidewaystable}
\end{document}
答案1
这是否接近您想要的?否则,请指出需要进行的更改,我会添加代码。
这是最终的表格。只保留了相关的包。
这是代码。
\documentclass{article}
\usepackage{multirow}
\usepackage{rotating}
% added <<<<<<<
%%%https://tex.stackexchange.com/questions/32597/vertically-centered-horizontal-rule-filling-the-rest-of-a-line
\newcommand{\Rhrule}{\leavevmode\kern-0.5ex\leaders\hrule height 0.7ex depth \dimexpr0.4pt-0.7ex\hfill\kern-6pt}
\newcommand{\Lhrule}{\leavevmode\kern-6pt\leaders\hrule height 0.7ex depth \dimexpr0.4pt-0.7ex\hfill\kern0.5ex}
\usepackage{bigstrut} % added <<<<<<<
\begin{document}
\begin{sidewaystable}[h!]
\begin{tabular}{|c|l|l|c|c|c|c|c|c|c|}
\hline
\multicolumn{3}{|c|}{frsturcio} & \multicolumn{7}{c|}{take the picture} \bigstrut[t] \\
\multicolumn{1}{|c}{} & \multicolumn{1}{c}{} & & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \bigstrut[b] \\ \hline
\multirow{8}[6]{*}{1} & on- & bench & \multirow{4}[2]{*}{7} & \multirow{4}[2]{*}{5} & \multirow{4}[2]{*}{9} & \multirow{4}[2]{*}{8} & \multicolumn{3}{l|}{kids} \bigstrut[t] \\
& dopal- & last & & & & & \multicolumn{3}{l|}{banana} \\
& test- & & & & & & \multicolumn{3}{l|}{paradise} \\
& martin & omanrtu & & & & & \multicolumn{3}{l|}{kostric} \bigstrut[b] \\ \cline{3-10}
& \multirow{3}[2]{*}{} & & \multirow{3}[2]{*}{8} & \multirow{3}[2]{*}{9} & \multirow{3}[2]{*}{10} & \multirow{3}[2]{*}{25} & & & \bigstrut[t] \\
& & name & & & & & 90 & 15 & 20 \\
& & apple & & & & & 9 & 8 & 7 \bigstrut[b] \\ \cline{2-10}
& \multicolumn{2}{c|}{mk} & 15 & 12 & 7 & 4 & 2 & 1 & 0 \bigstrut \\ \hline
\multirow{2}[4]{*}{2} & \multicolumn{2}{l|}{network} & 5 & 7 & 6 & 4 & \multicolumn{3}{c|}{3} \bigstrut \\ \cline{2-10}
& \multicolumn{2}{c|}{jk} & 20 & 17 & 13 & 8 & \multicolumn{3}{c|}{3} \bigstrut \\ \hline
\multirow{2}[4]{*}{3} & \multicolumn{2}{l|}{nylon} & 8 & 7 & 5 & 5 & \multicolumn{3}{c|}{4} \bigstrut \\ \cline{2-10}
& \multicolumn{2}{c|}{pi} & 30 & 25 & 20 & 10 & \multicolumn{3}{c|}{5} \bigstrut \\ \hline
\multirow{11}[4]{*}{4} & \multicolumn{2}{l|}{\multirow{10}[2]{*}{mjkouy}} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{poteqa} & \multicolumn{1}{l|}{lno} & \multicolumn{1}{l|}{last} & \multicolumn{3}{l|}{multicolour} \bigstrut[t] \\
& \multicolumn{2}{l|}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{fmjkouy} & \multicolumn{3}{l|}{mjkouy} \\
& \multicolumn{2}{l|}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{omjkouy} & \multicolumn{3}{l|}{mjkouy} \\
& \multicolumn{2}{l|}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{3}{l|}{mjkouy} \\
& \multicolumn{2}{l|}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{3}{l|}{mjkouy} \\
& \multicolumn{2}{l|}{} & \multicolumn{1}{l|}{mjkouy} & \multirow{5}[1]{*}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{3}{l|}{mjkouy mjkouy } \\
& \multicolumn{2}{l|}{} & \multicolumn{1}{l|}{mjkouy} & & \multirow{4}[1]{*}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{3}{c|}{\multirow{4}[1]{*}{}} \\
& \multicolumn{2}{l|}{} & \multirow{3}[1]{*}{} & & & \multicolumn{1}{l|}{1mjkouy} & \multicolumn{3}{c|}{} \\
& \multicolumn{2}{l|}{} & & & & \multicolumn{1}{l|}{mjkouy} & \multicolumn{3}{c|}{} \\
& \multicolumn{2}{l|}{} & & & & \multicolumn{1}{l|}{mjkouy} & \multicolumn{3}{c|}{} \bigstrut[b] \\ \cline{2-10}
& \multicolumn{2}{c|}{pp} & 25 & 20 & 12 & 6 & \multicolumn{3}{c|}{0} \bigstrut \\ \hline
\multirow{11}[4]{*}{5} & \multicolumn{1}{r|}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{2}{c|}{\multirow{2}[1]{*}{mjkouy}} & \multirow{2}[1]{*}{mjkouy} & \multirow{2}[1]{*}{mjkouy} & \multicolumn{3}{c|}{mjkouy} \bigstrut[t] \\
& \multicolumn{1}{r|}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{2}{c|}{} & & & \multicolumn{3}{c|}{oman} \\
& \multicolumn{4}{c}{\Lhrule oder \Rhrule} & \multicolumn{1}{c}{\Lhrule oder \Rhrule} & \multicolumn{1}{c}{\Lhrule oder \Rhrule} & \multicolumn{3}{c|}{\Lhrule oder \Rhrule} \\
& \multicolumn{1}{r|}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{2}{c|}{\multirow{4}[0]{*}{0}} & \multirow{4}[0]{*}{$0,0-0,2$} & \multirow{4}[0]{*}{$0,2-0,5$} & \multicolumn{3}{c|}{\multirow{4}[0]{*}{$>0,5$}} \\
& \multicolumn{1}{p{4.215em}|}{mjkouy } & \multicolumn{1}{l|}{mjkouy} & \multicolumn{2}{c|}{} & & & \multicolumn{3}{c|}{} \\
& \multicolumn{1}{p{4.215em}|}{mjkouy -} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{2}{c|}{} & & & \multicolumn{3}{c|}{} \\
& \multicolumn{1}{p{4.215em}|}{mjkouy } & \multicolumn{1}{l|}{mjkouy} & \multicolumn{2}{c|}{} & & & \multicolumn{3}{c|}{} \\
& \multicolumn{4}{c}{\Lhrule oder \Rhrule} & \multicolumn{1}{c}{\Lhrule oder \Rhrule} & \multicolumn{1}{c}{\Lhrule oder \Rhrule} & \multicolumn{3}{c|}{\Lhrule oder \Rhrule} \\
& \multicolumn{1}{r|}{} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{2}{c|}{\multirow{2}[1]{*}{mjkouy}} & \multirow{2}[1]{*}{mjkouy} & \multicolumn{1}{l|}{mjkouy} & \multicolumn{3}{l|}{mjkouy} \\
& \multicolumn{1}{r|}{} & & \multicolumn{2}{c|}{} & & \multicolumn{1}{l|}{mjkouy} & \multicolumn{3}{l|}{mjkouy} \bigstrut[b] \\ \cline{2-10}
& \multicolumn{2}{c|}{15} & \multicolumn{2}{c|}{10} & 7 & 4 & \multicolumn{3}{c|}{0} \bigstrut \\ \hline
\multirow{5}[8]{*}{6} & \multicolumn{2}{l|}{mjkouy } & \multirow{2}[2]{*}{mjkouy } & \multirow{2}[2]{*}{mjkouy } & \multirow{2}[2]{*}{mjkouy } & \multirow{2}[2]{*}{umjkouy } & \multicolumn{3}{l|}{\multirow{2}[2]{*}{mjkouy }} \bigstrut[t] \\
& \multicolumn{2}{l|}{mjkouy } & & & & & \multicolumn{3}{l|}{} \bigstrut[b] \\ \cline{2-10}
& \multirow{3}[6]{*}{pp} & mjkouy & 0 & 5 & 8 & 9 & \multicolumn{3}{c|}{5} \bigstrut \\ \cline{3-10}
& & mjkouy & 0 & 2 & 7 & 15 & \multicolumn{3}{c|}{15} \bigstrut \\ \cline{3-10}
& & mjkouy & 0 & 5 & 25 & 50 & \multicolumn{3}{c|}{60} \bigstrut \\ \hline
\end{tabular}%
\end{sidewaystable}
\end{document}
答案2
{NiceTabular}
这是使用的解决方案nicematrix
。此环境类似于{tabular}
(of array
),但在单元格、行和列下构造 PGF/Tikz 节点。可以将这些节点与 Tikz 一起使用,以\CodeAfter
将您想要的任何 Tikz 节点放入表格中。
\documentclass{article}
\usepackage{nicematrix,tikz}
\begin{document}
\renewcommand{\arraystretch}{2}
\begin{NiceTabular}{ccccccc}[hvlines]
\Block{5-1}{5}
& \Block{3-1}{mjkouy\\mjkouy\\mjkouy}
& \Block{1-1}{mjkouy\\mjkouy}
& mjkouy & mjkouy & mjkouy & mjkouy \\
&& \Block{1-1}{mjkouy\\mjkouy}
& 0 & $0.0$-$0.2$ & $0.2$-$0.5$ & $>0.5$ \\
&& mjkouy
& mjkouy & mjkouy & mjkouy & mjkouy \\
\\
\\
\CodeAfter
\begin{tikzpicture}
\foreach \x in {2,3}
\foreach \y in {4.5,5.5,6.5,7.5}
{ \node [fill=white,yshift=0.35mm] at (\x-|\y) {oder} ; }
\end{tikzpicture}
\end{NiceTabular}
\end{document}
您需要多次编译(因为 PGF/Tikz 使用 PGF/Tikz 节点)。
当有 时采用同样的技术\Block
。
\documentclass{article}
\usepackage{nicematrix}
\usepackage{tikz}
\begin{document}
\begin{NiceTabular}{*{4}{w{c}{3em}}}[cell-space-limits = 6pt, hvlines]
text & text & text & text \\
text & \Block{1-2}{2-cell BLOCK}
& & text \\
$\frac{\frac{\frac ab}c}d$ & text & text & text \\
\CodeAfter
\tikz \node [fill=white,yshift=0.3ex] at (3-|3) {order} ;
\end{NiceTabular}
\end{document}