A handy plugin that integrates with default Obsidian math, bringing AsciiMath power to your vault.
Important
Follow link below if you keep getting depreciation warning from the plugin
Updating notes created with plugin version 0.6.3 and lower
- (Recommended) Goto Obsidian plugin market, search for
obsidian-asciimath
and install it. - (Manually) Goto the release page, download the zip, unzip it and add it to your plugins folder.
AsciiMath has simpler syntax compared to LaTeX, which is the default math language for Obsidian. With this plugin, you can easily bring power of AsciiMath to your vault, as well as speed up process of math editing.
Note
Some of the rules are not exactly consistent with http://asciimath.org, especially the matrix. For more information, please refer to https://asciimath.widcard.win.
Obsidian AsciiMath ships with set of features that will help to get more productive when writing math in Obsidian.
This plugin integrates with Obsidian's dollar-sign math blocks. It is fully compatible with your previous notes written in LaTeX.
Just start writing AsciiMath as you would write LaTeX formulas and enjoy simpler syntax.
Inline math:
$lim_(a->oo) a_n = 0$
Display-style math:
$$
sum_(n=1)^oo 1/n^2 = pi^2/6
$$
If you do not want to use dollar-sign math blocks, you can use code-block for AsciiMath.
This will be rendered the same as double dollar sign blocks.
```am (or asciimath)
sum_(n=1)^oo 1/n^2 = pi^2/6
```
Note
Inline math is only available via dollar-sign blocks.
The plugin ships with some handy commands for you:
- Hit
Ctrl + P
- Search for
Insert AsciiMath symbol
- Hit Enter
- Search for desired symbol
- Select it & hit enter.
Note
Pro tip: You can assign a hotkey for this command to do this faster. My personal preference is Ctrl + M
This will insert code block around current selection.
- Convert AsciiMath into LaTeX in current file.
- Convert AsciiMath into LaTeX in the entire vault.
- Update asciimath blocks to new syntax in current file.
- Update asciimath blocks to new syntax in the entire vault.
In previous versions of the plugin users had to use special syntax for inline math. This feature is deprecated and will be removed in the future.
Note: default code blocks with three backticks will be supported as usual.
New syntax integrates with default Obsidian math blocks (dollar-sign blocks), which fully compatible when using both LaTeX and AsciiMath.
From now on, you should create inline blocks like this:
++ $<my_ascii_math>$
instead of
-- `$ <my_ascii_math> $`
For more on new syntax, refer to this section
To prepare your notes for the newer version of the plugin, you must convert your old AsciiMath notes to new syntax. This can be easily done with plugin commands:
- Hit
Ctrl + P
to open up command pallet. - Search for "Update old AsciiMath". Choose one of the two available commands by the "obsidian-asciimath" plugin.
- Confirm the changes.
- You're good to go!
git clone [email protected]:widcardw/obsidian-asciimath.git
pnpm i
pnpm run dev
During my use, this plugin often causes Obsidian rendering problems (especially in live preview mode). If you are interested in helping me to improve it, please feel free to give suggestions on github issues or pull requests. Thank you!