首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在列表中的指令后保持缩进

在列表中的指令后保持缩进
EN

Stack Overflow用户
提问于 2022-05-24 15:53:12
回答 1查看 87关注 0票数 1

在sphinx文档的RST中,并使用数学方程的sphinx.ext.imgmath扩展,我想在项目点列表的中间添加一个方程,但在该方程之后有第二段,并保持符号点的缩进水平。我认为,除了math之外,任何其他类型的指令都会出现同样的问题。

我当前的RST代码如下所示:

代码语言:javascript
复制
Introducing the bullet list on zero-th level indentation:

- First bullet point on first level indentation.

.. math::

   centered math equation

I would like this to be at the first level indentation because it belongs to the first bullet point but it lands on zero-th level indentation.

- Second bullet point on first level indentation.

这就赋予了:

代码语言:javascript
复制
Introducing the bullet list on zero-th level indentation:
    
    - First bullet point on first level indentation.
    
                     centered math equation
    
I would like this to be at the first level indentation because it belongs to the first bullet point but it lands on zero-th level indentation.
    
    - Second bullet point on first level indentation.

但我想:

代码语言:javascript
复制
Introducing the bullet list on zero-th level indentation:
    
    - First bullet point on first level indentation.
    
                     centered math equation
    
      I would like this to be at the first level indentation because it belongs to the first bullet point but it lands on zero-th level indentation.
    
    - Second bullet point on first level indentation.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-05-25 06:22:06

缩进math块及其后面的段落。

代码语言:javascript
复制
Introducing the bullet list on zero-th level indentation:

- First bullet point on first level indentation.

  .. math::

     centered math equation

  I would like this to be at the first level indentation because it belongs to the first bullet point  but it lands on zero-th level indentation.

- Second bullet point on first level indentation.

一致的压痕是非常重要的。见https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#indentation

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72365920

复制
相关文章

相似问题

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