Skip to content

Commit

Permalink
fix: typo in content-stateful-3.typ (#10)
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
hooyuser authored Sep 30, 2024
1 parent 7d4657a commit e166262
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/intermediate/content-stateful-3.typ
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ first-heading.update(headings => {
})
```

对于每页靠后的二级标题,都不能使`if`条件成立。所以`str(loc.page())`总是能对应到每页的第一个二级标题的内容
对于每页靠后的一级标题,都不能使`if`条件成立。所以`str(loc.page())`总是能对应到每页的第一个一级标题的内容

接下来便是简单的查询了,我们回忆之前`get-heading-at-page`的逻辑,它首先判断是否存在本页的第一个标题,否则取前页的最后一个标题。以下函数完成了前半部分:

Expand Down

0 comments on commit e166262

Please sign in to comment.