
He creado una tabla que se parece a la imagen de abajo, pero no estoy seguro de si está bien o no. Quiero decir, ¿por qué se muestra un espacio entre líneas después de las primeras filas de las dos filas? Lo marqué con color rojo. ¿O es el comportamiento correcto? ¿Alguien puede decirme por favor? He agregado mi código aquí.
\begin{table}[htbp]
\centering
\caption{Summary of the comparison with existing approaches}
\label{tab:Testing Results}
\begin{tabular}{|p{.30 cm}|p{2.2cm}|l|l|l|}
\hline
\multicolumn{2}{|p{2.5cm}|} {\diagbox { }{Approach}}&Lizhi [4]&Yuan [9]&Our Approach\\\hline
CS1 & Total Paths &6 &10 &3\\ \cline{2-5}
& Feasible Paths &6 &3 &3\\ \cline{2-5}
& Infeasible Paths &0 &7 &0 \\\hline
CS2 & Total Paths &35 &6 &1\\ \cline{2-5}
& Feasible Paths &35 &4 &1\\ \cline{2-5}
& Infeasible Paths &0 &2 &0 \\\hline
\end{tabular}
\end{table}
Respuesta1
Versiones simplificadas de la tabla con menos líneas y números alineados:
\documentclass{article}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{diagbox}
\usepackage{siunitx}
\begin{document}
\begin{table}[htbp]
\centering
\caption{Summary of the comparison with existing approaches}
\label{tab:Testing Results}
\begin{tabular}{
l
l
S[table-format=2]
S[table-format=2]
S[table-format=1]
}
\toprule
& & \multicolumn{3}{c}{Approach}\\
\cmidrule{3-5}
& & {Lizhi [4]}&{Yuan [9]}&{Our approach}\\
\midrule
CS1 & Total paths &6 &10 &3\\
& Feasible paths &6 &3 &3\\
& Infeasible paths &0 &7 &0 \\
\addlinespace
CS2 & Total paths &35 &6 &1\\
& Feasible paths &35 &4 &1\\
& Infeasible paths &0 &2 &0 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
Más observaciones:
LaTeX también puede crear una bibliografía y
[4]
puede[9]
reemplazarse llamando a macro\cite
.No veo ninguna razón para utilizar el título en mayúsculas y minúsculas. Por lo tanto, el ejemplo utiliza oraciones simples en mayúsculas y minúsculas para las entradas de la tabla.
Our approach
podría truncarse aOur
.