outline is hard!
This commit is contained in:
parent
00cb5a8694
commit
62aa3f42b2
@ -40,9 +40,7 @@
|
|||||||
linebreaks: self.store.mini-slides.at("linebreaks", default: true),
|
linebreaks: self.store.mini-slides.at("linebreaks", default: true),
|
||||||
short-heading: self.store.mini-slides.at("short-heading", default: true),
|
short-heading: self.store.mini-slides.at("short-heading", default: true),
|
||||||
)
|
)
|
||||||
} else if self.store.navigation == "line" {
|
} else if self.store.navigation == "line" { }
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#let fira-footer(self) = {
|
#let fira-footer(self) = {
|
||||||
@ -113,7 +111,7 @@
|
|||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// - config (dictionary): The configuration of the slide. You can use `config-xxx` to set the configuration of the slide. For more several configurations, you can use `utils.merge-dicts` to merge them.
|
/// - config (dictionary): The configuration of the slide. You can use `config-xxx` to set the configuration of the slide. For more several configurations, you can use `utils.merge-dicts` to merge them.
|
||||||
///
|
///
|
||||||
/// - extra (string, none): The extra information you want to display on the title slide.
|
/// - extra (string, none): The extra information you want to display on the title slide.
|
||||||
#let title-slide(
|
#let title-slide(
|
||||||
config: (:),
|
config: (:),
|
||||||
@ -136,16 +134,17 @@
|
|||||||
inset: 3em,
|
inset: 3em,
|
||||||
{
|
{
|
||||||
block(
|
block(
|
||||||
fill: self.colors.neutral-light,
|
// fill: self.colors.neutral-light,
|
||||||
inset: 1em,
|
inset: 1em,
|
||||||
width: 100%,
|
width: 100%,
|
||||||
// radius: 0.2em,
|
// radius: 0.2em,
|
||||||
text(size: 1.6em, fill: self.colors.primary, text(weight: "bold", info.title, hyphenate: false)) + (
|
text(size: 1.44em, fill: self.colors.primary, text(weight: "bold", info.title, hyphenate: false))
|
||||||
if info.subtitle != none {
|
+ (
|
||||||
linebreak()*2
|
if info.subtitle != none {
|
||||||
text(size: 1.2em, fill: self.colors.primary, info.subtitle)
|
linebreak() * 2
|
||||||
}
|
text(size: 1.1em, fill: self.colors.primary, info.subtitle)
|
||||||
),
|
}
|
||||||
|
),
|
||||||
)
|
)
|
||||||
set text(size: 1em)
|
set text(size: 1em)
|
||||||
if info.author != none {
|
if info.author != none {
|
||||||
@ -162,6 +161,7 @@
|
|||||||
if extra != none {
|
if extra != none {
|
||||||
block(spacing: 1em, extra)
|
block(spacing: 1em, extra)
|
||||||
}
|
}
|
||||||
|
linebreak()*2
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -170,16 +170,14 @@
|
|||||||
|
|
||||||
|
|
||||||
/// Outline slide for the presentation.
|
/// Outline slide for the presentation.
|
||||||
///
|
///
|
||||||
/// - config (dictionary): The configuration of the slide. You can use `config-xxx` to set the configuration of the slide. For more several configurations, you can use `utils.merge-dicts` to merge them.
|
/// - config (dictionary): The configuration of the slide. You can use `config-xxx` to set the configuration of the slide. For more several configurations, you can use `utils.merge-dicts` to merge them.
|
||||||
///
|
///
|
||||||
/// - title (string): The title of the slide. Default is `utils.i18n-outline-title`.
|
/// - title (string): The title of the slide. Default is `utils.i18n-outline-title`.
|
||||||
#let outline-slide(config: (:), title: utils.i18n-outline-title, ..args) = touying-slide-wrapper(self => {
|
#let outline-slide(config: (:), title: utils.i18n-outline-title, ..args) = touying-slide-wrapper(self => {
|
||||||
self = utils.merge-dicts(
|
self = utils.merge-dicts(
|
||||||
self,
|
self,
|
||||||
config-page(
|
config-page(footer: none),
|
||||||
footer: none,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
touying-slide(
|
touying-slide(
|
||||||
self: self,
|
self: self,
|
||||||
@ -190,10 +188,11 @@
|
|||||||
fill: self.colors.primary,
|
fill: self.colors.primary,
|
||||||
weight: "bold",
|
weight: "bold",
|
||||||
utils.call-or-display(self, title),
|
utils.call-or-display(self, title),
|
||||||
)+linebreak()*2,
|
)
|
||||||
|
+ linebreak() * 2,
|
||||||
text(
|
text(
|
||||||
fill: self.colors.neutral-darkest,
|
fill: self.colors.neutral-darkest,
|
||||||
outline(title: none, indent: 1em, depth: 1, ..args),
|
outline(title: none, indent: 1em, depth: 2, ..args),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -203,7 +202,7 @@
|
|||||||
/// New section slide for the presentation. You can update it by updating the `new-section-slide-fn` argument for `config-common` function.
|
/// New section slide for the presentation. You can update it by updating the `new-section-slide-fn` argument for `config-common` function.
|
||||||
///
|
///
|
||||||
/// Example: `config-common(new-section-slide-fn: new-section-slide.with(numbered: false))`
|
/// Example: `config-common(new-section-slide-fn: new-section-slide.with(numbered: false))`
|
||||||
///
|
///
|
||||||
/// - config (dictionary): The configuration of the slide. You can use `config-xxx` to set the configuration of the slide. For more several configurations, you can use `utils.merge-dicts` to merge them.
|
/// - config (dictionary): The configuration of the slide. You can use `config-xxx` to set the configuration of the slide. For more several configurations, you can use `utils.merge-dicts` to merge them.
|
||||||
///
|
///
|
||||||
/// - title (string): The title of the slide. Default is `utils.i18n-outline-title`.
|
/// - title (string): The title of the slide. Default is `utils.i18n-outline-title`.
|
||||||
@ -212,9 +211,7 @@
|
|||||||
#let new-section-slide(config: (:), title: utils.i18n-outline-title, ..args, body) = touying-slide-wrapper(self => {
|
#let new-section-slide(config: (:), title: utils.i18n-outline-title, ..args, body) = touying-slide-wrapper(self => {
|
||||||
self = utils.merge-dicts(
|
self = utils.merge-dicts(
|
||||||
self,
|
self,
|
||||||
config-page(
|
config-page(footer: none),
|
||||||
footer: none,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
touying-slide(
|
touying-slide(
|
||||||
self: self,
|
self: self,
|
||||||
@ -244,7 +241,7 @@
|
|||||||
/// Focus on some content.
|
/// Focus on some content.
|
||||||
///
|
///
|
||||||
/// Example: `#focus-slide[Wake up!]`
|
/// Example: `#focus-slide[Wake up!]`
|
||||||
///
|
///
|
||||||
/// - config (dictionary): The configuration of the slide. You can use `config-xxx` to set the configuration of the slide. For more several configurations, you can use `utils.merge-dicts` to merge them.
|
/// - config (dictionary): The configuration of the slide. You can use `config-xxx` to set the configuration of the slide. For more several configurations, you can use `utils.merge-dicts` to merge them.
|
||||||
#let focus-slide(config: (:), body) = touying-slide-wrapper(self => {
|
#let focus-slide(config: (:), body) = touying-slide-wrapper(self => {
|
||||||
self = utils.merge-dicts(
|
self = utils.merge-dicts(
|
||||||
@ -330,7 +327,12 @@
|
|||||||
primary: rgb("#0c4842"),
|
primary: rgb("#0c4842"),
|
||||||
alpha: 60%,
|
alpha: 60%,
|
||||||
subslide-preamble: self => block(
|
subslide-preamble: self => block(
|
||||||
text(1.2em, weight: "bold", fill: self.colors.primary, utils.display-current-heading(depth: self.slide-level, style: auto)),
|
text(
|
||||||
|
1.2em,
|
||||||
|
weight: "bold",
|
||||||
|
fill: self.colors.primary,
|
||||||
|
utils.display-current-heading(depth: self.slide-level, style: auto),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
..args,
|
..args,
|
||||||
body,
|
body,
|
||||||
@ -343,16 +345,11 @@
|
|||||||
(height: 4em, x: 2em, display-section: false, display-subsection: true, linebreaks: true, short-heading: true),
|
(height: 4em, x: 2em, display-section: false, display-subsection: true, linebreaks: true, short-heading: true),
|
||||||
mini-slides,
|
mini-slides,
|
||||||
)
|
)
|
||||||
set text(size: 24pt, font: ("FiraGO","Source Han Sans SC"), weight: 400)
|
set text(size: 24pt, font: ("FiraGO", "Source Han Sans SC"), weight: 400)
|
||||||
show math.equation: set text(font: "Fira Math")
|
show math.equation: set text(font: "Fira Math")
|
||||||
set strong(delta: 200)
|
set strong(delta: 200)
|
||||||
set par(justify: true)
|
set par(justify: true)
|
||||||
set outline.entry(fill: none)
|
show heading.where(level: 2): set text(size: 1.1em)
|
||||||
show heading: it => [
|
|
||||||
#set text(size: 1.1em)
|
|
||||||
#it.body
|
|
||||||
// #underline(it.body,stroke: 4pt, offset: 4pt)
|
|
||||||
]
|
|
||||||
|
|
||||||
show: touying-slides.with(
|
show: touying-slides.with(
|
||||||
config-page(
|
config-page(
|
||||||
@ -369,10 +366,10 @@
|
|||||||
),
|
),
|
||||||
config-common(
|
config-common(
|
||||||
slide-fn: slide,
|
slide-fn: slide,
|
||||||
new-section-slide-fn: none //new-section-slide,
|
new-section-slide-fn: none, //new-section-slide,
|
||||||
),
|
),
|
||||||
config-methods(
|
config-methods(
|
||||||
init: (self: none, body) => {
|
init: (self: none, body) => {
|
||||||
show heading: set text(self.colors.primary)
|
show heading: set text(self.colors.primary)
|
||||||
|
|
||||||
body
|
body
|
||||||
@ -400,4 +397,4 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
body
|
body
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
config-info(
|
config-info(
|
||||||
title: [Looong LONG lng Long longlonglonglonglonglong TITLE],
|
title: [Looong LONG lng Long longlonglonglonglonglong TITLE],
|
||||||
subtitle: [Subtitle],
|
subtitle: [Subtitle],
|
||||||
|
short-title: [not-long title],
|
||||||
author: [Authors],
|
author: [Authors],
|
||||||
date: datetime.today(),
|
date: datetime.today(),
|
||||||
// institution: [Institution],
|
// institution: [Institution],
|
||||||
@ -22,6 +23,12 @@
|
|||||||
|
|
||||||
#outline-slide()
|
#outline-slide()
|
||||||
|
|
||||||
|
== title
|
||||||
|
#slide[
|
||||||
|
write something here
|
||||||
|
$m a t h min sum$
|
||||||
|
]
|
||||||
|
|
||||||
= Section A
|
= Section A
|
||||||
|
|
||||||
== General piecewise linear convex function *$bb(R)^b bb(Z)^n $*
|
== General piecewise linear convex function *$bb(R)^b bb(Z)^n $*
|
||||||
@ -29,7 +36,7 @@
|
|||||||
$ x_(n+1) = (x_n + a/x_n) / 2 $
|
$ x_(n+1) = (x_n + a/x_n) / 2 $
|
||||||
|
|
||||||
|
|
||||||
A slide without a title but with *important* infos 测试中文
|
A slide without a title but with *important* infos 测试中文 $bb(Z),bb(R)$
|
||||||
|
|
||||||
$
|
$
|
||||||
min sum_(e in E) x_e f_k "such that some fonts"
|
min sum_(e in E) x_e f_k "such that some fonts"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user