Feat: add code function
This commit is contained in:
1
functions/code.typ
Normal file
1
functions/code.typ
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#let code = raw.with(block: true)
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
#let document(
|
#import "functions/code.typ": code
|
||||||
|
|
||||||
|
#let default(
|
||||||
title: "This is a title",
|
title: "This is a title",
|
||||||
authors: ((
|
authors: ((
|
||||||
name: "Yi-Ting Shih",
|
name: "Yi-Ting Shih",
|
||||||
@@ -32,12 +34,13 @@
|
|||||||
numbering: "1."
|
numbering: "1."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Raw default
|
||||||
|
show raw: set text(
|
||||||
|
font: "Consolas",
|
||||||
|
size: 8pt,
|
||||||
|
)
|
||||||
// Code section default
|
// Code section default
|
||||||
show raw: self => {
|
show raw.where(block: true): self => {
|
||||||
set text(
|
|
||||||
font: "Consolas",
|
|
||||||
size: 8pt
|
|
||||||
)
|
|
||||||
block(
|
block(
|
||||||
fill: luma(240),
|
fill: luma(240),
|
||||||
inset: 8pt,
|
inset: 8pt,
|
||||||
Reference in New Issue
Block a user