From c22ff583947e83a960114d79dbf5d43141cac831 Mon Sep 17 00:00:00 2001 From: Jean-Marie 'Histausse' Mineau Date: Thu, 21 Mar 2024 11:52:40 +0100 Subject: [PATCH] init --- README.md | 22 +++++++++++++++++++++- lib.typ | 2 ++ template/main.typ | 1 + typst.toml | 12 ++++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 lib.typ create mode 100644 template/main.typ create mode 100644 typst.toml diff --git a/README.md b/README.md index bae2ec0..2833b13 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,23 @@ # notes -A typst template/lib for taking notes. \ No newline at end of file +A typst template/lib for taking notes. + +## Usage + +Install the package locally: + +``` +git clone https://git.pains-perdus.fr/Pains-Perdus/typ-notes.git ~/.local/share/typst/packages/local/notes/0.0.1 +``` + +Use it in `typ` files with: + +``` +#import "@local/notes:0.0.1": * +``` + +Or to create a new note: + +``` +typst init @local/notes +``` diff --git a/lib.typ b/lib.typ new file mode 100644 index 0000000..268854b --- /dev/null +++ b/lib.typ @@ -0,0 +1,2 @@ +#import "@preview/gviz:0.1.0": * +#show raw.where(lang: "dot-render"): it => render-image(it.text) diff --git a/template/main.typ b/template/main.typ new file mode 100644 index 0000000..ab6bfbc --- /dev/null +++ b/template/main.typ @@ -0,0 +1 @@ +#import "@local/notes:0.0.1": * diff --git a/typst.toml b/typst.toml new file mode 100644 index 0000000..8517188 --- /dev/null +++ b/typst.toml @@ -0,0 +1,12 @@ +[package] +name = "notes" +version = "0.0.1" +entrypoint = "lib.typ" +authors = ["Histausse"] +license = "AGPL-3.0-or-later" +description = "A typst template/lib for taking notes." +repository = "https://git.pains-perdus.fr/Pains-Perdus/notes.git" + +[template] +path = "template" +entrypoint = "main.typ"