University 主题
这个美观的主题来自 Pol Dellaiera。
初始化
你可以通过下面的代码来初始化:
#import "@preview/touying:0.6.3": *
#import themes.university: *
#import "@preview/numbly:0.1.0": numbly
#show: university-theme.with(
aspect-ratio: "16-9",
config-info(
title: [Title],
subtitle: [Subtitle],
author: [Authors],
date: datetime.today(),
institution: [Institution],
logo: emoji.school,
),
)
#set heading(numbering: numbly("{1}.", default: "1.1"))
#title-slide()
其中 register 接收参数:
aspect-ratio: 幻灯片的长宽比为 "16-9" 或 "4-3",默认为 "16-9"。progress-bar: 是否显示 slide 顶部的进度条,默认为true。header: 显示在页眉的内容,默认为utils.display-current-heading(level: 2),也可以传入形如self => self.info.title的函数。header-right: 展示在页眉右侧的内容,默认为self => self.info.logo。footer-columns: 底部三栏 Footer 的宽度,默认为(25%, 1fr, 25%)。footer-a: 第一栏,默认为self => self.info.author。footer-b: 第二栏,默认为self => if self.info.short-title == auto { self.info.title } else { self.info.short-title }。footer-c: 第三栏,默认为
self => {
h(1fr)
utils.display-info-date(self)
h(1fr)
context utils.slide-counter.display() + " / " + utils.last-slide-number
h(1fr)
}
颜色主题
University 默认使用了
config-colors(
primary: rgb("#04364A"),
secondary: rgb("#176B87"),
tertiary: rgb("#448C95"),
neutral-lightest: rgb("#ffffff"),
neutral-darkest: rgb("#000000"),
)
颜色主题,你可以通过 config-colors() 对其进行修改。
slide 函数族
University 主题提供了一系列自定义 slide 函数:
#title-slide(logo: none, authors: none, ..args)