首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为什么在背页里我错过了桌子上的垂直边?

为什么在背页里我错过了桌子上的垂直边?
EN

Stack Overflow用户
提问于 2020-08-13 09:48:45
回答 1查看 794关注 0票数 0

我是新来的Latex公司,我创建了一张桌子

代码语言:javascript
运行
复制
    \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

但在右上角,垂直线没有显示。我怎么才能让它看起来呢?我的第二个问题是如何把“交通型”放在牢房的中心?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-08-13 10:10:50

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

还请不要缩放包含文本的元素。这将导致字体形状的次优使用。如果必须使表变小,请手动选择适当的字体大小。

代码语言:javascript
运行
复制
\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}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63392467

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档