我在 Jupyter 笔记本中上传了一个表格(ipynb 文件)。该表包含一些管道“|”,当然它位于 markdown 格式的单元格中。在我本地的 Jupyter 笔记本上看起来很正常:
表格的代码是:
||**hash table**|**direct-address table**|
|:-|:--------------:|:------------------------:|
|Storage requirement|$\Theta(|K|)$|$|U|$|
|Search time| $O(1)$ time for *average-case*|$O(1)$ time for *worst-case*|
|Location of an element with key $k$|slot $h(k)$|slot $k$|
但是,上传到Github后打开它似乎有问题(我怀疑'|'符号有错误):
中心对齐也失败。
如果之前有人问过这个问题,我深表歉意,但我尝试了其他答案:escape-pipe 。不幸的是,他们推荐的 \|
不起作用。 GitHub页面的链接是:this one ,您可以在其中看到编辑后的完整代码。
有人可以帮忙吗?我对 Github 和 Markdown 还很陌生。
最佳答案
我看到了该问题的链接答案,链接问题中的答案不正确,请查看那里的评论!
As of March 2019, in Gitlab Wikis, you still need to use "
|
" inside the markup code. – knb Mar 22 '19 at 13:52
您应该使用|
。
如果您不喜欢困惑的字符,请使用这个!
(Although it technically is a different character, you can still use it! [Its width is higher because it is a full-width character.])
全角字符:在键盘上输入|
,显示|
。 (注意作为不同字符的额外宽度)
普通管道:输入|
,这将显示|
,现场示例:“|”。
建议:
您应该使用 |
方法,因为该字符与您想要的完全相同,而不是该字符的不同变体。
关于python - 在 Github 上的 jupyter 笔记本的表中显示管道,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61940479/