azyarashi11k downloadsRender math expressions with Typst instead of MathJax.
Render math expressions in Obsidian using Typst instead of MathJax.
| Snippet | Script |
|---|---|
![]() |
![]() |
For details, refer to the Documentation section below.
I welcome Discussions featuring your wonderful snippets!
Are you an Obsidian LaTeX Suite user? Check out this guide, or if you want to use only Typst codeblocks, check out this issue.
[!NOTE] For a smoother experience, some values are different from (or added to) standard Typst defaults. (e.g.
datetime,smallcaps,fontsize, andCURSOR) See the notes here for details.
.typ View\ to make the search look for LaTeX commandsinline-middle to vertically center inline math so it lines up naturally with the surrounding text<br> and \n[\s\t]*> will be automatically replaced with line breaks)[^1]: jlyfish probably won't work correctly.
For a better typing experience, I strongly recommend installing the No more flickering inline math plugin by RyotaUshio:
| Turned OFF | Turned ON |
|---|---|
![]() |
![]() |
You can install this plugin via the Community Plugins tab within Obsidian. Search for "Typst Mate". Alternatively, you can also install using BRAT.
sqrt, bold)typst-render-to-excalidraw command)Advanced Settings > Enable Typst Mode > reload the plugin)If the export doesn't work correctly, try disabling background rendering before exporting.
#set page(margin: 0pt, width: auto, height: auto)
#show raw: set text(1.25em)
#set text(size: fontsize) // `fontsize` refers to the settings in Obsidian
#import "@preview/mannot:0.3.1": *
#import "@preview/quick-maths:0.2.1": shorthands
#show: shorthands.with(
($+-$, sym.plus.minus),
($|-$, math.tack),
)
// Typst 0.13.1 or before (plugin 2.1.7 or before)
// #let scr(it) = text(features: ("ss01",), box($cal(it)$))
You can apply your own custom CSS, not just the styling included in the plugin.
Depending on the three modes (inline, display, and codeblock), the styling method (style), and the identifier (id), the following CSS classes will be added:
typstmate-(mode)typstmate-style-(style)typstmate-id-(id)Typst Mate leverages the following open-source projects:
and contributors:
I'm grateful to the developers for making this plugin possible!
This section contains wording required for publishing on Obsidian's official Community Plugins page, so I include it here.
This plugin makes use of a large WebAssembly (Wasm) binary. Bundling it directly would significantly increase startup time, so it is automatically downloaded from the Releases page instead.
Network access is required to install Typst packages, and is also required by Typst Tools to display lists of packages and symbols and to use Detypify and Quiver.
If the cache for a given package cannot be found inside the Vault, this plugin will fall back to accessing the same local package files used by the Typst CLI. For the exact locations, see typst/README.md#local-packages.
See Discussion#10.