mirror of
https://github.com/mii443/obsidian-typst.git
synced 2025-09-03 15:59:13 +00:00
Update README
This commit is contained in:
25
README.md
25
README.md
@ -2,14 +2,26 @@
|
|||||||
|
|
||||||
Renders `typst` code blocks into images using [Typst](https://github.com/typst/typst) through the power of WASM! This is still very much in development, so suggestions/bugs are welcome!
|
Renders `typst` code blocks into images using [Typst](https://github.com/typst/typst) through the power of WASM! This is still very much in development, so suggestions/bugs are welcome!
|
||||||
|
|
||||||
**NOTE**: The plugin has to load fonts at startup, which on my machine takes about 20s but after that its *heckin* fast.
|
## Things to NOTE
|
||||||
|
- Typst does not currently support exporting to HTML only PDFs and PNGs. So due to image scaling, the rendered views may look a bit terrible. If you know how to fix this PLEASE HELP.
|
||||||
|
- File paths should be relative to the vault folder.
|
||||||
|
- System fonts are not loaded by default as this takes about 20 seconds (on my machine). Their is an option in settings to enable them (requires a reload of the plugin).
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
### `conf.typ`
|
||||||
|
```typst
|
||||||
|
#let styling(ct) = {
|
||||||
|
set page(width: 525pt, height: auto, margin: (x: 0pt, y: 1pt))
|
||||||
|
set heading(numbering: "1.")
|
||||||
|
set text(white)
|
||||||
|
ct
|
||||||
|
}
|
||||||
|
```
|
||||||
|
### `Typst.md`
|
||||||
```
|
```
|
||||||
```typst
|
```typst
|
||||||
#set page(width: 10cm, height: auto)
|
#import "conf.typ": styling
|
||||||
#set heading(numbering: "1.")
|
#show: styling
|
||||||
#set text(white)
|
|
||||||
|
|
||||||
= Fibonacci sequence
|
= Fibonacci sequence
|
||||||
The Fibonacci sequence is defined through the
|
The Fibonacci sequence is defined through the
|
||||||
@ -33,6 +45,7 @@ The first #count numbers of the sequence are:
|
|||||||
..nums.map(n => $F_#n$),
|
..nums.map(n => $F_#n$),
|
||||||
..nums.map(n => str(fib(n))),
|
..nums.map(n => str(fib(n))),
|
||||||
))
|
))
|
||||||
|
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -42,8 +55,10 @@ The first #count numbers of the sequence are:
|
|||||||
Until this plugin is submitted to the community plugins please install it by copying `main.js`, `styles.css`, and `manifest.json` from the releases tab to the folder `.obsidian/plugins/obsidian-typst`.
|
Until this plugin is submitted to the community plugins please install it by copying `main.js`, `styles.css`, and `manifest.json` from the releases tab to the folder `.obsidian/plugins/obsidian-typst`.
|
||||||
|
|
||||||
## TODO / Goals (In no particular order)
|
## TODO / Goals (In no particular order)
|
||||||
- [ ] Better font loading
|
- [x] Better font loading
|
||||||
|
- [x] Fix importing
|
||||||
- [ ] Fix Github Actions
|
- [ ] Fix Github Actions
|
||||||
|
- [ ] Better error handling
|
||||||
- [ ] Fix output image scaling
|
- [ ] Fix output image scaling
|
||||||
- [ ] Use HTML output
|
- [ ] Use HTML output
|
||||||
- [ ] Override default equation rendering
|
- [ ] Override default equation rendering
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 34 KiB |
Reference in New Issue
Block a user