这是我的简单解决方案。
\newcommand\TS{\rule{0pt}{3.5ex}}
\newcommand\BS{\rule[-2.3ex]{0pt}{0pt}}
\vspace{2mm}
%\begin{table}
\newcolumntype{g}{>{\columncolor{cyan!10}}c}
\begin{tabular}{|g|c|c|c|c|c|}%{p{1in}p{1in}p{1in}p{1in}}
\hline
x i mm\quad \TS \BS \ & \quad \TS \BS $6$ \quad \TS \BS & \quad \TS \BS $10$ \quad \TS \BS & \quad \TS \BS $11$ \quad \TS \BS& \quad \TS \BS $15$ \quad \TS \BS& \quad \TS \BS $20$ \quad \TS \BS \\
\hline
y \quad \TS \BS & \quad \TS \BS $300$ \quad \TS \BS & \quad \TS \BS $200$ \quad \TS \BS & \quad \TS \BS $110$ \quad \TS \BS & \quad \TS \BS $89$ \quad \TS \BS& \quad \TS \BS $60$ \quad \TS \BS\\
\hline
\end{tabular}
答案1
使用{NiceTabular}
和nicematrix
TikZ 绘制锯齿线。
\documentclass{article}
\usepackage{nicematrix,tikz}
\usetikzlibrary {decorations.pathmorphing}
\begin{document}
\NiceMatrixOptions
{
custom-line =
{
letter = Z ,
tikz = { decorate , decoration = zigzag }
}
}
\renewcommand{\arraystretch}{2}
\begin{NiceTabular}{|m{4cm}|c|cZw{c}{1cm}Zc|c|}
\cline{1-3}\cline{5-6}
Antal år efter 1970 & 0 & 1 & ... & 39 & 40 \\
\cline{1-3}\cline{5-6}
Produktion af palmeolie (tusinde ton) & 217 & 250 & ... & 19324 & 21958 \\
\cline{1-3}\cline{5-6}
\end{NiceTabular}
\end{document}