Caution
This repository has migrated to Codeberg!
Please check out the new repo here: https://codeberg.org/MultisampledNight/flow
A bundle of template and a few more utils, written in and for Typst.
#import "@preview/flow:0.4.0": *
#show: note.with(
title: "Super cool title!",
)
The actual body text!Or just typst init @preview/flow which does the same!
A set of utils for actual application. While there's many amazing libraries for Typst, such as cetz, cetz-plot or whalogen, often they're too flexible for just getting things down.
Flow aims to fill that missing spot between flexible unlimited libraries and ad-hoc application. It offers a set of explicitly biased defaults and different fields, but doesn't force them: Anyone can add or change them as-needed.
So, get ready for a quick tour on what's offered!
- Just typing some text and want some metadata, outline, formatting and todo lists?
#show: note, that's it! - Need to pass something through as LaTeX
under significant time pressure?
#show: template.latex-esque - Want something rather custom
while still getting the other utils?
Use
#show: template.genericanywhere in your template!
They're functions that accept content, e.g.:
#question[
What's the Deal with Birds?
(https://www.chm.bris.ac.uk/sillymolecules/birds.pdf)
]question,hint,remarkandcautionfor quickly communicating intent of some text!axiom,define,theorem,propose,lemmaandcorollaryfor math and structured workflows!
= Shopping list
- [ ] Still to do
- [>] Currently doing this
- [:] Some paused item
- [/] Aww this has been cancelled
- [?] Not sure what to do
- [!] *Really* need to do this- Want something to be an unchecked task?
Just make it a list entry in the form of
- [ ] thing! - Completed the task?
Replace the space in the brackets with an
x! - In progress? Paused? Blocked? Cancelled? Unknown? Urgent?
Just use other characters instead of
x, like>,:,-,/,?and!
- Typing a lot of math? Check out
preset.math(mostly just linear algebra for now)!- Bored of
abs,bold,norm,arrow,tildebeing too long to type? Common math characters are double-defined to have common shortcuts!- Bold x?
xb - Vector c?
cv - Conjugate transposed M?
MH - Absolute value of vector p?
pva
- Bold x?
- Null vector?
null - Plane defined via 3 points?
plp(a, b, c) - Want to quickly throw a function plot in?
plot(x => pow(x, 2)) integral_(-oo)^oois too long?iinf- Sum with index k starting at 1 ending at n?
sk1nor even justsk1n - Limit of k towards infinity?
limk(oo)
- Bored of
- Controlled via the command-line inputs rather than the file you're writing!
- Pass
--input theme=duality(or setthemetodualityin your UI's inputs) for a nicer dark mode theme! - In the file, use
bgfor the background color!fgfor the foreground color!gamut.sample(n%)to selectnpercent between background and foreground!
- Pass any extra arguments you want available to your template of choice!
- Some templates like e.g.
noterender them before the main content!- Some metadata like
cweven highlights specially!
- Some metadata like
- If you just want to get the metadata out of a file
without anything else,
you can use
typst query --input render=falsewhich take on the text and is far faster!
- Want to render a directed graph? Use
gfx.diagram!- Pass
- a dictionary as a keyword argument to
nodes, keyed by name and position as value - a dictionary to
edges, keyed by source and target as string- the target can also be several (
all("a", "b", "c")) or in a row (seq("a", "b", "c"))!
- the target can also be several (
- a dictionary as a keyword argument to
- Edges can be tagged, colored, stroked, branched!
- E.g.
tag("a", tag: [hi!]),styled("a", stroke: blue),br(br("a", "b"), "c")
- E.g.
- Pass
See the manual!
You can compile doc/manual.typ manually
or just download
the last run compiled by CI!
The template under template is under MIT-0,
everything else here is under MIT.
See LICENSE.md for details.