繁体   English   中英

为什么在背面我错过了表格中的垂直边缘?

[英]Why in overleaf I miss a vertical edges in the table?

在此处输入图像描述

我是 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

但是在右上角,没有显示垂直线。 我怎样才能让它出现? 我的第二个问题如何将“运输类型”放在单元格的中心?

您可以使用\multicolumn{6}{c|}{...}添加缺失的边缘,但在实际使用之前,请查看http://betterposters.blogspot.com/2012/08/the -data-prison.htmlhttps://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.Z437175BA4191210EE004E1D93744指导一些漂亮的表格布局。 使用垂直线是非常糟糕的风格。

也请不要缩放包含文本的元素。 这将导致字体形状的使用不理想。 如果您必须缩小表格,请手动选择合适的字体大小。

\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}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM