我的一些人物有很长的标题,导致轮廓丑陋。
有没有办法截断
outline.entry
文本,设置文本长度的最大宽度或在 N 个字符后触发换行符,以便 outline.entry
编译为:
我检查了源并设法用
show outline.entry: set box(...)
修改了部分标题之后的部分,但我不知道如何访问BoxElem
之前的内容。
您确实可以构建自己的
outline.entry
显示规则。关键成分是clip: true
,位于it.body
周围的盒子上:
#show outline.entry: it => {
style(styles => {
let line-height = 1em
// "columns" width determines how much of the caption should show
grid(columns: (2fr, 1fr))[
#box(it.body, height: line-height, clip: true)
][
#box(width: 1fr, it.fill)
#box(it.page)
]
})
}
#outline(target: figure)
#figure(caption: [#lorem(150)])[
A figure
]