105 lines
1.7 KiB
Markdown
105 lines
1.7 KiB
Markdown
# notes
|
|
|
|
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 <directory>
|
|
```
|
|
|
|
A useful alias to generate a new note *in the current directory*:
|
|
|
|
```
|
|
alias new-note='TMP_ENV="$(mktemp -d)" && typst init @local/notes "${TMP_ENV}/note" 2>/dev/null && mv -i ${TMP_ENV}/note/* . && rm -r ${TMP_ENV} && mv -i main.typ '
|
|
```
|
|
|
|
## Features
|
|
|
|
### Graph
|
|
|
|
This package import gviz and pintora to render graphs:
|
|
|
|
```
|
|
\```dot-render
|
|
digraph mygraph {
|
|
rankdir="LR";
|
|
b -> a;
|
|
a -> c;
|
|
c -> b;
|
|
}
|
|
\```
|
|
```
|
|
|
|
`digraphLR`, `digraphTB`, `graphLR` and `graphTB` remove boilerplate code where writing in a hurry:
|
|
|
|
```
|
|
\```digraphLR
|
|
a -> b;
|
|
b -> c;
|
|
c -> a;
|
|
\```
|
|
|
|
\```graphTB
|
|
a -- b;
|
|
b -- c;
|
|
c -- a;
|
|
\```
|
|
|
|
```
|
|
\```pintora
|
|
mindmap
|
|
@param layoutDirection TB
|
|
* Pintora diagrams
|
|
** UML Diagrams
|
|
*** Sequence Diagram
|
|
*** Activity Diagram
|
|
*** Component Diagram
|
|
** Non-UML Diagrams
|
|
*** Entity Relationship Diagram
|
|
*** Mind Map
|
|
*** Gantt Diagram
|
|
*** DOT Diagram
|
|
\```
|
|
```
|
|
```
|
|
|
|
### Todo
|
|
|
|
Todos can be defined with the `todo` function. In addition to being highlighted, the unresolved totos are listed at the end of the generated document.
|
|
|
|
```
|
|
Lorem ipsum dolore #todo[sit] amet
|
|
```
|
|
|
|
To mark a todo as resolved without deleting it, you can mark it as such:
|
|
|
|
```
|
|
Lorem ipsum dolore #todo(done: true)[sit] amet
|
|
```
|
|
|
|
To hid todos, you can add this line at the top of the document:
|
|
|
|
```
|
|
#show-todos.update(_ => false)
|
|
```
|
|
|
|
## TODO:
|
|
|
|
- biblio
|
|
- What to do with resolved toto?
|