Skip to content

Commit 4390274

Browse files
🎨 Put all of the packages in a single file (#18)
* 🎨 Put all of the packages in a single file * πŸ’š Fix missing codly glob import
1 parent 715916f commit 4390274

File tree

8 files changed

+41
-17
lines changed

8 files changed

+41
-17
lines changed

β€Ždocs-template.typβ€Ž

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
#import "@preview/codly:0.2.0": *
2-
#import "@preview/tidy:0.1.0"
1+
#import "./packages.typ": codly, tidy
2+
#import codly: *
33

44
#let docs-template(
5-
title: "", subtitle: "", abstract: [], authors: (), url: none, date: none, version: none, body,
5+
title: "",
6+
subtitle: "",
7+
abstract: [],
8+
authors: (),
9+
url: none,
10+
date: none,
11+
version: none,
12+
body,
613
) = {
714
// Set the document's basic properties.
815
set document(author: authors, title: title)
@@ -29,17 +36,20 @@
2936
]
3037

3138
// Author information.
32-
pad(
33-
top: 0.5em, x: 2em, grid(
34-
columns: (1fr,) * calc.min(3, authors.len()), gutter: 1em, ..authors.map(author => align(center, strong(author))),
35-
),
36-
)
39+
pad(top: 0.5em, x: 2em, grid(
40+
columns: (1fr,) * calc.min(3, authors.len()),
41+
gutter: 1em,
42+
..authors.map(author => align(center, strong(author))),
43+
))
3744

3845
v(3cm, weak: true)
3946

4047
// Abstract.
4148
pad(
42-
x: 3.8em, top: 1em, bottom: 1.1em, align(
49+
x: 3.8em,
50+
top: 1em,
51+
bottom: 1.1em,
52+
align(
4353
center,
4454
)[
4555
#heading(outlined: false, numbering: none, text(0.85em, smallcaps[Abstract]))
@@ -71,7 +81,11 @@
7181
#let show-module-fn(module, fn, ..args) = {
7282
module.functions = module.functions.filter(f => f.name == fn)
7383
tidy.show-module(
74-
module, ..args.pos(), ..args.named(), show-module-name: false, show-outline: false,
84+
module,
85+
..args.pos(),
86+
..args.named(),
87+
show-module-name: false,
88+
show-outline: false,
7589
)
7690
}
7791

@@ -104,6 +118,8 @@
104118
}
105119

106120
stack(
107-
dir: ltr, [/ #term: #t \ #description], align(right, if default != none { [(default: #default)] }),
121+
dir: ltr,
122+
[/ #term: #t \ #description],
123+
align(right, if default != none { [(default: #default)] }),
108124
)
109125
}

β€Ždocs.pdfβ€Ž

417 Bytes
Binary file not shown.

β€Ždocs.typβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#import "./docs-template.typ": *
2+
#import "./packages.typ": tidy
23

3-
#import "@preview/tidy:0.1.0"
44

55
#let version = toml("/typst.toml").package.version
66
#let import-statement = "#import \"@preview/tidy:" + version + "\""

β€Žpackages.typβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#import "@preview/tidy:0.1.0"
2+
#import "@preview/codly:0.2.0"
3+
#import "@preview/tablex:0.0.8"
4+
#import "@preview/showybox:2.0.1"
5+
#import "@preview/timeliney:0.0.1"
6+
#import "@preview/cetz:0.2.0"

β€Žthemes/radial/components/admonitions.typβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#import "../icons/icons.typ"
33
#import "/utils.typ"
44
#import "../metadata.typ": *
5-
#import "@preview/showybox:2.0.1": showybox
5+
#import "/packages.typ": showybox
6+
#import showybox: *
67

78
/// A message in a colored box meant to draw the reader's attention.
89
///

β€Žthemes/radial/components/decision-matrix.typβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#import "../colors.typ": *
22
#import "/utils.typ"
33

4-
#import "@preview/tablex:0.0.5": *
4+
#import "/packages.typ": tablex
5+
#import tablex: *
56

67
/// A decision matrix table.
78
///

β€Žthemes/radial/components/gantt-chart.typβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#import "@preview/timeliney:0.0.1"
1+
#import "/packages.typ": timeliney
22

33
/// A gantt chart for task management
44
///
@@ -125,4 +125,4 @@
125125
})
126126
}
127127
)
128-
}
128+
}

β€Žthemes/radial/components/graphs.typβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#import "../colors.typ": *
2+
#import "/packages.typ": cetz
23

3-
#import "@preview/cetz:0.2.0"
44

55
/// Creates a labeled pie chart.
66
///

0 commit comments

Comments
Β (0)