Skip to content

如何避免公式、图表等块元素的下一行缩进?

如何避免公式、图表等块元素的下一行缩进?

在段落中加入行间数学公式,总会在后面加入一个新段落,导致出现段落首行缩进。我们希望在创建行间数学公式,且公式后没有空行时,不出现新段落和首行缩进。

#box() 将行间数学公式包住,且不能有空行。

typst
#set par(first-line-indent: (amount: 2em, all: true))

#lorem(10), for example,
#box[$ integral x + y = z $]
shows that the integral of $x + y$ is $z$.

#lorem(20)
Typst compiled image

对比

typst
#lorem(10), for example,
$ integral x + y = z $
shows that the integral of $x + y$ is $z$.
Typst compiled image

对于 tight list 和 figure 来说也是同理。

相关 issue:Paragraph should be able to contain tight lists and block-level equations · #3206

What do you think?
  • 0
  • 0
  • 0
  • 0
  • 0
  • 0
Comments
  • Latest
  • Oldest
  • Hottest
Powered by Waline v3.5.1

基于 MIT 许可发布