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

Move font setup into template #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ At the top of the gnerated `slides.typ`, you will find the line
which you can edit to configure the template with the following options:
```typ
#show: metropolis.setup.with(
text-font: "Fira Sans",
math-font: "Fira Math",
code-font: "Fira Code",
text-size: 23pt,
footer: [My cool footer], // defaults to none
)
Expand Down
8 changes: 0 additions & 8 deletions lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@

#let setup(
footer: none,
text-font: "Fira Sans",
math-font: "Fira Math",
code-font: "Fira Code",
text-size: 23pt,
body,
) = {
Expand All @@ -69,16 +66,11 @@
header: slide-title-header,
)
set text(
font: text-font,
// weight: "light", // looks nice but does not match Fira Math
size: text-size,
fill: rgb("#23373b"), // dark teal
)
set strong(delta: 100)
show math.equation: set text(font: math-font)
show raw: set text(font: code-font)
set align(horizon)
show emph: it => text(fill: bright, it.body)
show heading.where(level: 1): _ => none

body
Expand Down
10 changes: 9 additions & 1 deletion template/slides.typ
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#import "@preview/polylux:0.4.0": *
#import "@preview/metropolis-polylux:0.1.0" as metropolis
#import metropolis: new-section, focus
#import metropolis: new-section, focus, bright

#show: metropolis.setup

#set strong(delta: 100)
#set text(font: "Fira Sans")
#show math.equation: set text(font: "Fira Math")
#show raw: set text(font: "Fira Mono")

// Set emphasized text to be bright orange
#show emph: it => text(fill: bright, it.body)

#slide[
#set page(header: none, footer: none, margin: 3em)

Expand Down