为什么在背面我错过了 table 中的垂直边缘?
Why in overleaf I miss a vertical edges in the table?
我是 Latex 新手,我创建了一个 table
\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
但是在右上角,竖线没有显示。我怎样才能让它出现?
我的第二个问题如何将 'Transportation type' 放在单元格的中心?
您可以使用 \multicolumn{6}{c|}{...}
添加缺失的边缘,但在您实际使用它之前,请先查看 http://betterposters.blogspot.com/2012/08/the-data-prison.html or https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf 以获得一些关于漂亮 table 布局的指南。使用垂直线是非常糟糕的风格。
也请不要缩放包含文本的元素。这将导致字体形状的使用不理想。如果您必须使 table 变小,请手动选择合适的字体大小。
\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}
我是 Latex 新手,我创建了一个 table
\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
但是在右上角,竖线没有显示。我怎样才能让它出现? 我的第二个问题如何将 'Transportation type' 放在单元格的中心?
您可以使用 \multicolumn{6}{c|}{...}
添加缺失的边缘,但在您实际使用它之前,请先查看 http://betterposters.blogspot.com/2012/08/the-data-prison.html or https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf 以获得一些关于漂亮 table 布局的指南。使用垂直线是非常糟糕的风格。
也请不要缩放包含文本的元素。这将导致字体形状的使用不理想。如果您必须使 table 变小,请手动选择合适的字体大小。
\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}