Renders typst code blocks in Obsidian into images using Typst through the power of WASM!

Overview

Obsidian Typst

Renders typst code blocks into images using 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.

Example

```typst
#set page(width: 10cm, height: auto)
#set heading(numbering: "1.")
#set text(white)

= Fibonacci sequence
The Fibonacci sequence is defined through the
_recurrence relation_ $F_n = F_(n-1) + F_(n-2)$.
It can also be expressed in closed form:

$ F_n = floor(1 / sqrt(5) phi.alt^n), quad
  phi.alt = (1 + sqrt(5)) / 2 $

#let count = 10
#let nums = range(1, count + 1)
#let fib(n) = (
  if n <= 2 { 1 }
  else { fib(n - 1) + fib(n - 2) }
)

The first #count numbers of the sequence are:

#align(center, table(
  columns: count,
  ..nums.map(n => $F_#n$),
  ..nums.map(n => str(fib(n))),
))
```​

Installation

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)

  • Better font loading
  • Fix Github Actions
  • Fix output image scaling
  • Use HTML output
  • Override default equation rendering
  • Custom editor for .typ files
You might also like...
BSV stdlib written in Rust and runs in WASM environments

BSV.WASM A Rust/WASM Library to interact with Bitcoin SV Installation NodeJS: npm i bsv-wasm --save Web: npm i bsv-wasm-web --save Rust: https://crate

A wasm interpreter written by rust

A wasm interpreter written by rust

a wasm interpreter written by rust

wai (WebAssembly interpreter) A simple wasm interpreter This is an ongoing project DEMO 2021-06-27.10.23.18.mov Install Install via Homebrew brew inst

swc node binding use wasm

node_swc swc node binding use wasm Build Make sure you have rust wasm-pack installed. $ yarn build # build wasm, node Usage import { parseSync, printS

Re-implementation of Panda Doodle in Rust targetting WASM, a mobile game originally written in C++

Description This is the source code of my game Panda Doodle, which can be played at https://pandadoodle.lucamoller.com/ (it's best playable on touch s

2D Predictive-Corrective Smoothed Particle Hydrodynamics (SPH) implementation in Rust with WASM + WebGL

pcisph-wasm 2D Predictive-Corrective Smoothed Particle Hydrodynamics (SPH) implementation in Rust with WASM + WebGL Reimplementation of my previous Ru

A playground for creating generative art, buit with Rust🦀 and WASM🕸
A playground for creating generative art, buit with Rust🦀 and WASM🕸

Genny A playground for creating generative art, buit with Rust 🦀 and WASM 🕸 About This is a simple playground that allows me to explore ideas around

A Conway's Game of Life implementation in Rust & WASM
A Conway's Game of Life implementation in Rust & WASM

Rust Wasm Game of Life This repo contains an example implementation of Conway's Game of Life in Rust and WebAssembly. How to use You should have wasm-

🦞 wasm-pack based build tool

rsw-rs This project is in early experimental stage. # dev rsw watch # release rsw build # create crate rsw new # rsw.toml name = 'rsw' version = "0.

Comments
  • Replace LaTeX equations with Typst syntax

    Replace LaTeX equations with Typst syntax

    Hi, thanks for your work which looks amazing.

    This issue is about a question / feature request: Would it be possible for this plugin to compile Obsidian equations with Typst instead the default?

    opened by thibaultdouzon 1
Owner
Jack
Do you like my duck? It goes quack...
Jack
A Wasm component optimizer (mostly a wrapper around wasm-opt)

component-opt An optimizer for Wasm Components Current Status This project currently only offers one optimization and does not allow it to be configur

Robin Brown 6 Mar 4, 2024
A W.I.P desktop application for a new typesetting language, typst.

[WIP] typstudio A W.I.P desktop application for a new markup-based typesetting language, typst. Typstudio is built using Tauri. Features Syntax highli

Cubxity 40 Apr 25, 2023
Bindings to the Tauri API for projects using wasm-bindgen

tauri-sys Raw bindings to the Tauri API for projects using wasm-bindgen Installation This crate is not yet published to crates.io, so you need to use

Jonas Kruckenberg 25 Jan 9, 2023
The easiest way to search for images on your desktop 🔎

What is ByteDetective? ByteDetective is a desktop app (currently available for MacOS) that acts as a semantic search engine for your photos. The aim i

Santosh Passoubady 15 Jul 21, 2023
Plugin to request a relaunch when uploading a Skyline plugin through cargo skyline

restart-plugin A skyline plugin for allowing cargo-skyline (or other tools) to restart your game without you having to touch your controller. Install

null 1 Nov 21, 2021
A rollup plugin that compile Rust code into WebAssembly modules

rollup-plugin-rust tl;dr -- see examples This is a rollup plugin that loads Rust code so it can be interop with Javascript base project. Currently, th

Fahmi Akbar Wildana 37 Aug 1, 2022
The lambda-chaos-extension allows you to inject faults into Lambda functions without modifying the function code.

Chaos Extension - Seamless, Universal & Lightning-Fast The lambda-chaos-extension allows you to inject faults into Lambda functions without modifying

AWS CLI Tools 5 Aug 2, 2023
A reactive DOM library for Rust in WASM

maple A VDOM-less web library with fine-grained reactivity. Getting started The recommended build tool is Trunk. Start by adding maple-core to your Ca

Luke Chu 1.8k Jan 3, 2023
A low-ish level tool for easily writing and hosting WASM based plugins.

A low-ish level tool for easily writing and hosting WASM based plugins. The goal of wasm_plugin is to make communicating across the host-plugin bounda

Alec Deason 62 Sep 20, 2022
wasm actor system based on lunatic

Wactor WASM actor system based on lunatic. Actors run on isolated green threads. They cannot share memory, and communicate only through input and outp

Noah Corona 25 Nov 8, 2022