【问题标题】:Displaying a warning box on pages generated by python-sphinx在 python-sphinx 生成的页面上显示警告框
【发布时间】:2018-04-27 20:35:59
【问题描述】:

如何在使用sphinx-build生成的html中显示警告框?

Warning

Do not use the directives sectnum, header and footer.

我想将上述消息显示为: (抱歉,不允许我在此处将图片嵌入帖子中)
请忽略文本格式,我的主要目的是显示一个带有一些文本的框以引起用户的注意like on sphinx-doc site

【问题讨论】:

    标签: python-sphinx restructuredtext


    【解决方案1】:

    您想要的 reStructuredText 语法适用于名为 admonition directives 的东西。

    该具体示例存在于documentation source

    .. warning::
    
       Do *not* use the directives :dudir:`sectnum`, :dudir:`header` and
       :dudir:`footer`.
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-15
    相关资源
    最近更新 更多