3

I would like to use the same column width, how could I achieve that?

\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}
2
  • You should a complete MWE (minimal working example) with the \documentclass, \begin{document}, etc. Nov 3, 2023 at 15:26
  • @F.Pantigny I have just edited
    – taiwan12
    Nov 3, 2023 at 15:31

1 Answer 1

3

You can add a specification for the widths of the columns (except the first).

\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}

Output of the above code

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .