From 5a290913a2b076125191ce8c1c46457e726b893d Mon Sep 17 00:00:00 2001 From: Yi-Ting Shih Date: Mon, 14 Apr 2025 10:15:25 +0800 Subject: [PATCH] Feat: add code function --- functions/code.typ | 1 + styles.typ => module.typ | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 functions/code.typ rename styles.typ => module.typ (87%) diff --git a/functions/code.typ b/functions/code.typ new file mode 100644 index 0000000..3e23800 --- /dev/null +++ b/functions/code.typ @@ -0,0 +1 @@ +#let code = raw.with(block: true) diff --git a/styles.typ b/module.typ similarity index 87% rename from styles.typ rename to module.typ index a461e7c..38011a3 100644 --- a/styles.typ +++ b/module.typ @@ -1,4 +1,6 @@ -#let document( +#import "functions/code.typ": code + +#let default( title: "This is a title", authors: (( name: "Yi-Ting Shih", @@ -32,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,