我是新来的Latex公司,我创建了一张桌子
\begin{table}[!ht]
\centering
\caption{Cities analyzed in this study}
\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|}
\hline
City & Number of & Number of & \multicolumn{2}{c}{Transportation type} \\
\cline{4-9}
& stations & routes & Bus & Tram & Subway&Rail&Ferry& Cable-car \\
\hline
Adelaide & 7548 & 9234 & 8950 &54 & - & 230 & -&- \\
\hline
但在右上角,垂直线没有显示。我怎么才能让它看起来呢?我的第二个问题是如何把“交通型”放在牢房的中心?
发布于 2020-08-13 10:10:50
您可以通过使用\multicolumn{6}{c|}{...}
添加缺失的边缘,但在实际使用该边框之前,请查看http://betterposters.blogspot.com/2012/08/the-data-prison.html或https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf,了解一些关于漂亮的表布局的指南。使用垂直线是非常糟糕的风格。
还请不要缩放包含文本的元素。这将导致字体形状的次优使用。如果必须使表变小,请手动选择适当的字体大小。
\documentclass{article}
\begin{document}
\begin{table}[!ht]
\centering
\caption{Cities analyzed in this study}
\begin{tabular}{|l|c|c|c|c|c|c|c|c|c|}
\hline
City & Number of & Number of & \multicolumn{6}{c|}{Transportation type} \\
\cline{4-9}
& stations & routes & Bus & Tram & Subway&Rail&Ferry& Cable-car \\
\hline
Adelaide & 7548 & 9234 & 8950 &54 & - & 230 & -&- \\
\hline
\end{tabular}
\end{table}
\end{document}
https://stackoverflow.com/questions/63392467
复制相似问题