Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

章节上下边距 #6

Open
zhengzavan opened this issue May 29, 2024 · 2 comments
Open

章节上下边距 #6

zhengzavan opened this issue May 29, 2024 · 2 comments

Comments

@zhengzavan
Copy link

zhengzavan commented May 29, 2024

latex模板章节标题(一级标题)有较大的上下边距。

@zhengzavan
Copy link
Author

zhengzavan commented May 29, 2024

感觉应该是layout/mainmatter.typ中,above、below设置错误。本人不懂latex所以找不到官方模板的边距是多少

// 4.2 设置字体字号并加入假段落模拟首行缩进
show heading: it => {
set text(
font: array-at(heading-font, it.level),
size: array-at(heading-size, it.level),
weight: array-at(heading-weight, it.level),
..unpairs(heading-text-args-lists
.map((pair) => (pair.at(0), array-at(pair.at(1), it.level))))
)
set block(
above: array-at(heading-above, it.level),
below: array-at(heading-below, it.level),
)
it
fake-par
}


补充:这两个数值好像只能叠加到下边距上,叠加不到上边距。

@OrangeX4
Copy link
Member

OrangeX4 commented Jun 2, 2024

heading-above: (2 * 15.6pt - 0.7em, 2 * 15.6pt - 0.7em),
heading-below: (2 * 15.6pt - 0.7em, 1.5 * 15.6pt - 0.7em),

你可以考虑修改这两项,只需要修改两个列表的第一项就可以了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants