Compare commits

...

2 Commits

Author SHA1 Message Date
5a290913a2 Feat: add code function 2025-04-14 10:15:25 +08:00
9315fd36fd Feat: add header and page number 2025-04-14 09:20:30 +08:00
2 changed files with 12 additions and 6 deletions

1
functions/code.typ Normal file
View File

@@ -0,0 +1 @@
#let code = raw.with(block: true)

View File

@@ -1,4 +1,6 @@
#let document(
#import "functions/code.typ": code
#let default(
title: "This is a title",
authors: ((
name: "Yi-Ting Shih",
@@ -11,6 +13,8 @@
set page(
paper: "a4",
margin: (x: 1.8cm, y: 1.5cm),
header: align(right, title),
numbering: "1",
)
set text(
font: "Libertinus serif",
@@ -30,12 +34,13 @@
numbering: "1."
)
// Raw default
show raw: set text(
font: "Consolas",
size: 8pt,
)
// Code section default
show raw: self => {
set text(
font: "Consolas",
size: 8pt
)
show raw.where(block: true): self => {
block(
fill: luma(240),
inset: 8pt,