我想使用相同的列宽,该如何实现?
\documentclass[12pt]{report}
\usepackage[margin=2.5cm,headsep=7.5mm,footskip=7.5mm,bindingoffset=0in,headheight=8mm,showframe=false]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{tabularray}
\usepackage{tabularx}
\begin{document}
\begin{table}[h]
\centering
\begin{tblr}{
column{even} = {c},
column{3} = {c},
column{5} = {c},
cell{4}{2} = {c=5}{},
hline{2,7} = {-}{},
}
Method & A & B & C & D & E \\
Temp (1) [°C] & -78 & 24 & 70 & 100 & 70 \\
Time (1) [h] & 0.25 & 0.5 & 0.5 & 0.5 & 0.5 \\
XXX & XX & & & & \\
Temp (2) [°C] & -78 \textrightarrow 70 & 24 & -78 \textrightarrow 70 & 24 \textrightarrow 100 & 150 \\
Time (2) [h] & 1-1 & 1 & 1-1 & 1-1 & 1
\end{tblr}
\end{table}
\end{document}
答案1
您可以添加列宽的规范(第一列除外)。
\documentclass{article}
\usepackage{tabularray}
\begin{document}
\begin{table}[h]
\centering
\begin{tblr}{
column{even} = {c},
column{3} = {c},
column{5} = {c},
column{2-Z} = {wd=16mm},
cell{4}{2} = {c=5}{},
hline{2,7} = {-}{},
}
Method & A & B & C & D & E \\
Temp (1) [°C] & $-78$ & 24 & 70 & 100 & 70 \\
Time (1) [h] & 0.25 & 0.5 & 0.5 & 0.5 & 0.5 \\
XXX & XX & & & & \\
Temp (2) [°C] & $-78 \to 70$ & 24 & $-78 \to 70$ & $24 \to 100$ & 150 \\
Time (2) [h] & 1-1 & 1 & 1-1 & 1-1 & 1
\end{tblr}
\end{table}
\end{document}