【问题标题】:How do I use a substitution directive with an abbreviation in Sphinx (reST)?如何在 Sphinx (reST) 中使用带有缩写的替换指令?
【发布时间】:2017-09-22 23:05:17
【问题描述】:

我正在尝试在我的 Sphinx 文档中使用替换和缩写来自动化缩写,如下所示:

.. |CFD| :abbr:`CFD (Computational Fluid Dynamics)`

我得到错误:

Substitution definition "CFD" empty or invalid.

【问题讨论】:

    标签: python-sphinx substitution restructuredtext


    【解决方案1】:

    您在 reStructuredText 标记中省略了 replace::。这应该可以。

    .. |CFD| replace:: :abbr:`CFD (Computational Fluid Dynamics)`
    

    【讨论】:

      猜你喜欢
      • 2021-05-15
      • 2013-05-19
      • 2010-11-16
      • 1970-01-01
      • 2020-09-28
      • 2019-10-21
      • 1970-01-01
      • 2022-01-07
      • 1970-01-01
      相关资源
      最近更新 更多