【问题标题】:Create columned text reStructuredText创建列文本 reStructuredText
【发布时间】:2015-08-26 01:23:34
【问题描述】:

我正在尝试将 reStructuredText 部分格式化为如下所示:

type1 : this     type4 : this     type7 : this
type2 : this     type5 : this     type8 : this
type3 : this     type6 : this     type9 : this

这样我可以用文本水平填充页面,有谁知道我可以如何做到这一点?我猜它与css和容器有关?

【问题讨论】:

  • 你能发布你尝试过的 HTML 和 CSS 吗?
  • 如果可以选择使用 CSS 框架,您可以使用 Bootstrap 完成类似的操作。
  • 可以选择一张桌子吗?

标签: css restructuredtext


【解决方案1】:

这是我最好的选择,而不是玩 css 和容器......

我认为没有一种方法可以在本地执行您在重组文本中尝试的操作。但是,如果你使用Sphinx,有一个指令叫做hlist(水平列表):http://sphinx-doc.org/markup/para.html

你这样写:

.. hlist::
  :columns: 3

* A list of
* short items
* that should be
* displayed
* horizontally

它被转换为:

希望这会有所帮助!

【讨论】:

    猜你喜欢
    • 2011-07-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-25
    相关资源
    最近更新 更多