乳胶中的复杂表格-紧急需要帮助

乳胶中的复杂表格-紧急需要帮助

复杂表 1 我急需帮助来制作表格,如附图所示。请帮助我

\begin{table} 
\caption{check} 
\begin{tabular}{lrrrrrrrrrrr}
\hline 
Details & Wind speed & Turbulent model &\multicolumn{2}{r}{Wind random seed} & Wave height & Spectrum & Wave period & Wave direction & &\multicolumn{2}{r}{Wind random seed} \\ [0.5ex] 
\hline 
Design & 15 & 11 & 11 & 11 & 11 & 11 & 11 & 11 & 11 & 11& 11 \\ 
%\multirow{2}{}{Dataset 1} 
& \multirow{2}{}{Dataset 2} & \multirow{2}{*}{Dataset 3} & \multicolumn{2}{c}{A} & 
\end{tabular} 
\end{table}

我遇到以下错误;

在此处输入图片描述

答案1

这是一个使用选项booktabs因此避免使用垂直规则:

在此处输入图片描述

\documentclass{article}

\usepackage[landscape]{geometry}% Just for this example

\usepackage{booktabs}
\newcommand{\BC}{\textsc{bc}}
\newcommand{\LQR}{\textsc{lqr}}

\begin{document}

\begin{table}
  \centering
  \caption{Load test details}
  \begin{tabular}{ l *{16}{c} }
    \toprule
    & \multicolumn{8}{c}{\bfseries Load test 1} & \multicolumn{8}{c}{\bfseries Load test 2} \\
    \cmidrule(lr){2-9} \cmidrule(lr){10-17}
    & \multicolumn{2}{c}{\itshape max} & \multicolumn{2}{c}{\itshape min} & 
      \multicolumn{2}{c}{\itshape mean} & \multicolumn{2}{c}{\itshape st.d.} &
      \multicolumn{2}{c}{\itshape max} & \multicolumn{2}{c}{\itshape min} & 
      \multicolumn{2}{c}{\itshape mean} & \multicolumn{2}{c}{\itshape st.d.} \\
    \cmidrule(lr){2-3}\cmidrule(lr){4-5}\cmidrule(lr){6-7}\cmidrule(lr){8-9}
    \cmidrule(lr){10-11}\cmidrule(lr){12-13}\cmidrule(lr){14-15}\cmidrule(lr){16-17}
    & \BC & \LQR & \BC & \LQR & \BC & \LQR & \BC & \LQR & 
      \BC & \LQR & \BC & \LQR & \BC & \LQR & \BC & \LQR \\
    \midrule
    Electrical torque & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X \\
    Gen speed & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X \\
    Blade pitch & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X \\
    Electrical power & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X \\
    Surge & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X \\
    Sway & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X \\
    Yaw & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X & X \\
    \bottomrule
  \end{tabular}
\end{table}

\end{document}

答案2

我认为以下代码重现了您在屏幕截图中显示的表格的布局。

在此处输入图片描述

\documentclass{article}
\usepackage{rotating,  % for "sidewaystable" environment
            tabularx,  % for "tabularx" environment
            ragged2e}  % for "\RaggedRight" macro
\begin{document}
\begin{sidewaystable}
\renewcommand\arraystretch{1.5} % more generous spacing
\setlength\tabcolsep{5pt}       % default is 6pt
\begin{tabularx}{\textwidth}{@{} >{\RaggedRight}X | *{15}{c|}c @{}}
\hline
Load test details & 
\multicolumn{8}{c|}{Load Test 1} & \multicolumn{8}{c@{}}{Load Test 2} \\
\hline
Parameters &
\multicolumn{2}{c|}{max}  & \multicolumn{2}{c|}{min}   &
\multicolumn{2}{c|}{mean} & \multicolumn{2}{c|}{st.d.} &
\multicolumn{2}{c|}{max}  & \multicolumn{2}{c|}{min}   &
\multicolumn{2}{c|}{mean} & \multicolumn{2}{c@{}}{st.d.} \\
\cline{2-17}
& BC & LQR & BC & LQR & BC & LQR & BC & LQR 
& BC & LQR & BC & LQR & BC & LQR & BC & LQR \\ \hline
Electrical Torque & & & & & & & & & & & & & & & & \\ \hline
Gen Speed         & & & & & & & & & & & & & & & & \\ \hline
Rot Speeed        & & & & & & & & & & & & & & & & \\ \hline
Blade Pitch       & & & & & & & & & & & & & & & & \\ \hline
Electrical Power  & & & & & & & & & & & & & & & & \\ \hline
Surge             & & & & & & & & & & & & & & & & \\ \hline
Sway              & & & & & & & & & & & & & & & & \\ \hline
Yaw               & & & & & & & & & & & & & & & & \\
\hline
\end{tabularx}
\end{sidewaystable}
\end{document}

相关内容