Eu escrevi uma tabela no beamer. O código está abaixo:
\documentclass{beamer}
\usepackage{adjustbox}
\begin{document}
\begin{frame}
\centering
\adjustbox{max height=\dimexpr\textheight-5.5cm\relax,
max width=.9\textwidth}{
\begin{tabular}{|c|c|c|c|c|}
\hline
\begin{tabular}{c}
XYZ\\ABC
\end{tabular}
& \multicolumn{2}{c|}{Number of Vehicles } & \begin{tabular}{c}
Monthly\\Saving
\end{tabular} &
\begin{tabular}{c}
Improvement in\\ ABC (\%)
\end{tabular} \\
\hline
& PQR & ZXC & & \\
\hline
140 & 61 & 41 & 4 & 12 \\
\hline
150 & 83 & 61 & 4 & 12 \\
\hline
170 & 124 & 12 & 4 & 12 \\
\hline
\end{tabular}
}
\end{frame}
\end{document}
Quero mesclar as três últimas linhas da 4ª coluna para que a entrada 4 apareça apenas uma vez. Como isso pode ser feito?
Responder1
Em vez disso, \hline
você pode usar\cline{1-3}\cline{5-5}
\documentclass{beamer}
\usepackage{adjustbox}
\begin{document}
\begin{frame}
\centering
\adjustbox{max height=\dimexpr\textheight-5.5cm\relax,
max width=.9\textwidth}{
\begin{tabular}{|c|c|c|c|c|}
\hline
\begin{tabular}{c}
XYZ\\ABC
\end{tabular} &
\multicolumn{2}{c|}{Number of Vehicles } &
\begin{tabular}{c}
Monthly\\Saving
\end{tabular} &
\begin{tabular}{c}
Improvement in\\ ABC (\%)
\end{tabular} \\
\hline
& PQR & ZXC & & \\
\hline
140 & 61 & 41 & & 12 \\
\cline{1-3}\cline{5-5}
150 & 83 & 61 & 4 & 12 \\
\cline{1-3}\cline{5-5}
170 & 124 & 12 & & 12 \\
\hline
\end{tabular}
}
\end{frame}
\end{document}