Render-as-you-type math formulas for Alfred: AsciiMath to PNG and LaTeX

Last Updated: 30/11/20 11:21:05

Stars: 0

# AsciiMath for Alfred

An Alfred 4 workflow that

renders math as you type and lets you copy the PNG and LaTeX.

### Motivation

My fashcard software supports neither LaTeX nor MathML.

Given that image is the only way to go, I created this workflow.

### Setup

- Download the latest release.
- Type
`.asciimath-init`

in Alfred.

### Permissions explanation

The accessibility permission is needed so that the math window

can automatically close if you press `escape`

to exit Alfred

without either copying the image or the LaTeX.

### Usage instructions

- Open Alfred
- Type
```

(backtick) - Start typing a math expression in AsciiMath syntax.
- As soon as you start typing, another window opens and

it displays the typesetted math in real time as you type. - Pressing
`enter`

closes both alfred and the math window,

and puts a PNG image into clipboard. - Instead of pressing enter, if you pressed
`command + enter`

,

it copies LaTeX instead of the image to clipboard.

### Built-in reference

If you are stuck in middle of typing, just stop, hit shift,

and it’ll pop up a reference. When done consulting the reference,

hit escape, and start typing from where you left off!