Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/components.typ
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@
///
/// - short-heading (boolean): Indicates whether the headings should be shortened. Default is `true`.
///
/// - inline (boolean): Indicates whether the bullets are displayed right after the text, instead of breaking the line. Default is `false`.
///
/// -> content
#let mini-slides(
self: none,
Expand All @@ -433,6 +435,7 @@
display-subsection: true,
linebreaks: true,
short-heading: true,
inline: false,
) = (
context {
let headings = query(heading.where(level: 1).or(heading.where(level: 2)))
Expand Down Expand Up @@ -470,7 +473,11 @@
hd.body
}
[#link(hd.location(), body)<touying-link>]
linebreak()
if inline {
h(.5em)
} else {
linebreak()
}
while (
slides.len() > 0 and slides.at(0).location().page() < next-page
) {
Expand Down Expand Up @@ -542,7 +549,7 @@
})
}
set align(top)
show: block.with(inset: (top: .5em, x: 2em))
show: block.with(inset: (top: .5em, x: if inline { 1em } else { 2em }))
show linebreak: it => it + v(-1em)
set text(size: .7em)
grid(columns: cols.map(_ => auto).intersperse(1fr), ..cols.intersperse([]))
Expand Down
2 changes: 2 additions & 0 deletions themes/dewdrop.typ
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
),
linebreaks: self.store.mini-slides.at("linebreaks", default: true),
short-heading: self.store.mini-slides.at("short-heading", default: true),
inline: self.store.mini-slides.at("inline", default: false),
)
}
}
Expand Down Expand Up @@ -326,6 +327,7 @@
/// - display-subsection (boolean): Whether the slides of subsections are displayed in the mini-slides.
/// - linebreaks (boolean): Whether line breaks are in between links for sections and subsections in the mini-slides.
/// - short-heading (boolean): Whether the mini-slides are short. Default is `true`.
/// - inline (boolean): Whether the mini-slides are displayed right after the section or subsection link, or on a new line. Default is `false`.
///
/// - footer (content, function): The footer of the slides. Default is `none`.
///
Expand Down