匹配表格的复杂格式

匹配表格的复杂格式

我正在尝试重新创建下表: 在此处输入图片描述

我正在将文本翻译成英文,并尝试获得类似的表格,但我在管理 LaTeX 表格的狂野世界时遇到了麻烦!这是我所拥有的,或者至少是我所得到的最接近的,但并不多。

\usepackage{multicol,multirow,tabularx,pbox,makecell}
\usepackage{titling}
\usepackage{lettrine}
\usepackage{soul}

\begin{document}

\noindent
\begin{tabularx}{\textwidth}{||>{\centering\arraybackslash}X|>{\centering\arraybackslash}X|>{\centering\arraybackslash}X|>{\centering\arraybackslash}X||}
    \hhline{|t:====:t|}
    \multirow{2}{2cm}{\centering\arraybackslash\textsc{RATIO} \newline \footnotesize of the \newline \textsc{\footnotesize radii}.} & 
            \multicolumn{2}{>{\hsize=\dimexpr2\hsize+2\tabcolsep+\arrayrulewidth\relax\centering\arraybackslash}X|}{\textsc{\footnotesize ratio of the thickness of the electric layer on the two spheres,}} & 
                \multirow{2}{2.5cm}{\centering\arraybackslash\textsc{DIFFERENCE \footnotesize between calculation} \footnotesize and \textsc{\footnotesize observation.}} \\
        \hhline{||~~~~||}
         & \footnotesize according to calculation. & \footnotesize according to experiment. & \\
        \hhline{||----||}
        a & b & c & d \\
        a & b & c & d \\
        a & b & c & d \\
    \hhline{|b:====:b|}
\end{tabularx}
\end{document}

在此处输入图片描述

显然,情况不太好。我需要更粗的边框线、更好的页眉垂直间距以及我不太关心的花饰,但这将是一个很好的补充。那么,哪些软件包可以提供一条相对简单的路径来实现这种格式?我如何才能更接近目标,包括垂直间距等等?

答案1

一个可以作为NiceTabular嵌套的起点tcolorbox

在此处输入图片描述

\documentclass{article}
\usepackage{pbox}
\usepackage{tcolorbox}
\newtcolorbox{mybox}{colback=white,
                    colframe=black,
                    boxrule=1.5pt,
                    sharp corners,
                    top=0pt,
                    bottom=0pt,
                    right=0pt,
                    left=0pt
                    }
                    
\usepackage{nicematrix}

\newlength{\tablewidth}
\setlength{\tablewidth}{\dimexpr\textwidth-8.7pt-5\arrayrulewidth}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}

\begin{document}

\noindent
\begin{mybox}
\centering
\begin{NiceTabular}{*{4}{C{0.25\tablewidth-2\tabcolsep}}}[hvlines,cell-space-limits=3pt]
     \scshape\footnotesize\Block{2-1}{RATIO \\ \textnormal{of the}\\ radii.} 
    & \scshape\footnotesize\Block{1-2}{ratio of the thickness of the\\ electric layer on the two spheres,} 
    && \scshape\footnotesize\Block{2-1}{DIFFERENCE \\ between \\ calculation  \textnormal{and} \\ observation.} \\
         & \footnotesize according to calculation. & \footnotesize according to experiment. & \\
        a & b & c & d \\
        a & b & c & d \\
        a & b & c & d \\
\end{NiceTabular}
\end{mybox}
\end{document}

相关内容