Skip to content

Commit

Permalink
flow:0.2.0 (#1621)
Browse files Browse the repository at this point in the history
  • Loading branch information
MultisampledNight authored Jan 27, 2025
1 parent 1361bfa commit c7cc4e3
Show file tree
Hide file tree
Showing 30 changed files with 3,190 additions and 0 deletions.
51 changes: 51 additions & 0 deletions packages/preview/flow/0.2.0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Changelog

Note:
This document
only covers significant **user-facing** changes.

## 0.2.0

### Breaking

- Shortcut presets have been moved
to the globally-available `preset` module
- E.g. if you've used `#import linalg: *` before,
use `#import preset.linalg: *` instead
- Remove `slides` template and `presentation` module
- It was
- never properly documented
- an utter hack causing more headaches than it saved in writing time
- dependent on polylux
- which was never updated to resolve the compiler's warnings
about the new `context` mechanism
- and needlessly spamming my logs hence

### Additions

- Use [Halcyon](https://github.com/bchiang7/Halcyon)
as new default theme for codeblocks
- Fill `preset.linalg` with more utilities
- (Conjugate) transposition via `trp`/`ctrp`
- Inner product via `ipr`
- Overline via `ovl`
- Shorthands for ... after the pattern ...
- Transposition → `xT`
- Conjugate transposition → `xH`
- Vector boldface → `xvb`
- Vector tildized → `xva`
- Vector transposed → `xvT`
- Vector conjugate transposed → `xvH`
- Add more preset modules
- They're quite empty for now
- `preset.quantum`
- `preset.calculus`
- More keyword conjugates
- The `modern` template (used by e.g. `note`)
defaults to [optimized linebreaks](https://typst.app/docs/reference/model/par/#parameters-linebreaks)
now
- Should result in more visually consistent blocks of text

## 0.1.2

Initial published
64 changes: 64 additions & 0 deletions packages/preview/flow/0.2.0/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
===============================================================================
For files in `template`:

MIT No Attribution License

Copyright (c) 2025 MultisampledNight

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
===============================================================================

===============================================================================
For `asset/halcyon.tmTheme` and
the definition of `halcyon`'s bg/fg in `src/palette.typ`:

MIT License

Copyright (c) 2018 Brittany Chiang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
===============================================================================

===============================================================================
For all other files in this repo:

MIT License

Copyright (c) 2025 MultisampledNight

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
===============================================================================
89 changes: 89 additions & 0 deletions packages/preview/flow/0.2.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# flow

A bundle of template and a few more utils, written in and for [Typst].

## Quick start

```typst
#import "@preview/flow:0.2.0": *
#show: note.with(
title: "Super cool title!",
)
The actual body text!
```

Or just `typst init @preview/flow` which does the same!

## What's in here?

### Well, templates!

- Just typing a note and need a few defaults?
`#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.generic` anywhere in *your* template!

### Callouts!

- `question`, `hint`, `remark` and `caution` for
quickly communicating intent of some text!
- `axiom`, `define`, `theorem`, `propose`, `lemma` and `corollary` for
math and structured workflows!

### Todo lists!

- 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 `!`

### Themes!

- Controlled via the command-line inputs
rather than the file you're writing!
- Pass `--input theme=duality` (or set `theme` to `duality` in your UI's inputs)
for a nicer dark mode theme!
- In the file, use
- `bg` for the background color!
- `fg` for the foreground color!
- `gamut.sample(n%)` to select `n` percent
between background and foreground!

### Metadata!

- Pass any extra arguments you want available to your template of choice!
- Some templates like e.g. `note` render them before the main content!
- Some metadata like `cw` even highlights specially!
- If you just want to get the metadata out of a file
without anything else,
you can use `typst query --input render=false`
which take on the text and
is far faster!

### Diagrams!

- Nodes and edges!
- Edges can be tagged, colored, stroked, branched!

## I'm sold, where do I find out more?

See the manual!
You can compile `doc/manual.typ` manually
or just download
[the last run compiled by CI](https://github.com/MultisampledNight/flow/actions/workflows/compile-docs.yaml)!

[Typst]: https://typst.app

# License

The template under `template` is under MIT-0,
everything else here is under MIT.
See [LICENSE.md](./LICENSE.md) for details.
Loading

0 comments on commit c7cc4e3

Please sign in to comment.