
Aquí está mi esfuerzo para generar esta tabla. ¿Quería saber por qué me sale un error? El error es "secuencia no definida". Alternativamente, cualquier formato mejor es bienvenido para tabular los siguientes datos de muestra.
\begin{table}
\centering
\captionsetup{width=10cm}
\caption{Initial, post-etch and post SPM treatment heights.}
\label{tab:2}
\begin{tabular}{l *{3}{S[table-format=4.0]}}
\toprule
{Wafer \#} & {Initial height} & {Post-etch height}&{Post SPM treatment} &{SPM treatment}$ \\
& \si{\mu m} & \si{\mu m} &\si{nm}\\
\midrule
$Length (mm)$ & 1.4725 & 1.5875 & 142.5 & 112\\
$Width (mm)$ & 1.4725 & 1.575& 142.5& 113 \\
$Thickness (mm)$ & 1.495 & 1.5925& 132.5& 145 \\
$Young modulus (GPa))$ & 1.492 & 1.66 & 190& 456\\
$Young modulus (GPa)$ & 1.465 & 1.63& 197.5& 5454 \\
$TYoung modulus (GPa)$ & 1.2525 & 1.4625& 192.5 & 543\\
$Young modulus (GPa)$ & 1.2525 & 1.4625& 192.5& 903 \\
$Boundary conditions$ & 1.2525 & 1.4625& 192.5& 5353 \\
$Applied load$ & 1.2525 & 1.4625& 192.5& 434 \\
$Young modulus (GPa)$ & 1.2525 & 1.4625& 192.5& 5345 \\
\bottomrule
\end{tabular}
\end{table}
Respuesta1
Esto funciona, tenga en cuenta los paquetes cargados y los cambios en la tabla.
\documentclass{article}
\usepackage{siunitx,booktabs,caption}
\begin{document}
\begin{table}
\centering
\captionsetup{width=10cm}
\caption{Initial, post-etch and post SPM treatment heights.}
\label{tab:2}
\begin{tabular}{
l
S[table-format=1.4]
S[table-format=1.4]
S[table-format=3.1]
S[table-format=4.0]
}
\toprule
{Wafer \#} & {Initial} & {Post-etch} & {Post SPM} & {SPM} \\
& {height} & {height} & {treatment} & {treatment} \\
& \si{\micro\meter}
& \si{\micro\meter}
& \si{\nano\meter} \\
\midrule
Length (\si{mm}) & 1.4725 & 1.5875 & 142.5 & 112 \\
Width (\si{mm}) & 1.4725 & 1.575 & 142.5 & 113 \\
Thickness (\si{mm}) & 1.495 & 1.5925 & 132.5 & 145 \\
Young modulus (\si{GPa}) & 1.492 & 1.66 & 190 & 456 \\
Young modulus (\si{GPa}) & 1.465 & 1.63 & 197.5 & 5454 \\
TYoung modulus (\si{GPa}) & 1.2525 & 1.4625 & 192.5 & 543 \\
Young modulus (\si{GPa}) & 1.2525 & 1.4625 & 192.5 & 903 \\
Boundary conditions & 1.2525 & 1.4625 & 192.5 & 5353 \\
Applied load & 1.2525 & 1.4625 & 192.5 & 434 \\
Young modulus (\si{GPa}) & 1.2525 & 1.4625 & 192.5 & 5345 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
Respuesta2
Propongo esto, usando además makecell
:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[showframe]{geometry}
\usepackage{siunitx, booktabs, caption, makecell}
\DeclareSIUnit\micron{\micro\metre}
\renewcommand\theadfont{\normalsize\upshape}
\begin{document}
\begin{table}
\centering
\captionsetup{width=10cm}\setlength\extrarowheight{3pt}
\caption{Initial, post-etch and post SPM treatment heights.}
\label{tab:2}
\begin{tabular}{ @{}>{\itshape}l *{2}{S[table-format=1.4]}S[table-format=3.1]S[table-format=4.0]}
\toprule
{\thead{Wafer \#\\ (\si{\micron})}} & {\thead{Initial height\\ (\si{\micron})}} & {\thead{Post-etch \\ height (\si{\micron})}}
& {\thead{Post SPM\\ treatment (\si{\nm})}} & {\thead{SPM\\ treatment}} \\
\midrule
Length (mm) & 1.4725 & 1.5875 & 142.5 & 112\\
Width (mm) & 1.4725 & 1.575& 142.5& 113 \\
Thickness (mm) & 1.495 & 1.5925& 132.5& 145 \\
Young modulus (GPa) & 1.492 & 1.66 & 190& 456\\
Young modulus (GPa) & 1.465 & 1.63& 197.5& 5454 \\
TYoung modulus (GPa) & 1.2525 & 1.4625& 192.5 & 543\\
Young modulus (GPa) & 1.2525 & 1.4625& 192.5& 903 \\
Boundary conditions & 1.2525 & 1.4625& 192.5& 5353 \\
Applied load & 1.2525 & 1.4625& 192.5& 434 \\
Young modulus (GPa) & 1.2525 & 1.4625& 192.5& 5345 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}