如何合并单元格?

如何合并单元格?

我把这段代码放入LaTeX

\begin{table}[H]

\begin{tabularx}{\linewidth}{l*{4}{>{\centering\arraybackslash}X}}

\toprule

Ensaio & Medi\c{c}\~{o}es do comprimento do fio (cm) & Incerteza associada (cm)\\

\midrule

1 & 48,80 & 0,05\\

2 & 48,80\\

3 & 48,70\\

M\'{e}dia & 48,77\\

\bottomrule

\end{tabularx}

\end{table}

我想要将第一列的数字和文本置于中间。我该怎么做?

答案1

我会这样做。请注意,您可以使用键盘上的重音字母,因为现在所有系统都理解UTF8

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
 \usepackage{amsmath,tabularx, float, booktabs}
 \renewcommand{\tabularxcolumn}[1]{>{\centering\arraybackslash}m{#1}}

\begin{document}

\begin{table}[H]
  \begin{tabularx}{\linewidth}{c*{2}{X}}
    \toprule
    Ensaio & Medições do comprimento do fio (cm) & Incerteza associada (cm) \\
    \midrule
    1 & 48,80 & 0,05 \\
    2 & 48,80\\
    3 & 48,70\\
    Média & 48,77\\
    \bottomrule
  \end{tabularx}
\end{table}

\end{document} 

在此处输入图片描述

相关内容