Search the Community
Showing results for tags 'equation'.
My fashcard software supports neither LaTeX nor MathML. Given that image is the only way to go, I created this workflow where you, 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. Q: Why AsciiMath? A: Because it is extremely concise and intuitive. Check out this handy list of asciimath-vs-latex comparison examples. Q: What if I don't know how to write a particular thing in AsciiMath? A: 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 again, and start typing from where you left off! (see gif below) Meta: A thing that I find exciting is this gives an example of a "rich preview as you type" workflow. Broad Technical details: custom protocol URLs: gives a cheap one-way-server functionality, ie, a way for alfred scripts to communicate with the running app, instead of launching an app every script invocation, or, running a server manually in the app (or some other complicated IPC scheme) monitor window events so that even if the user presses escape and quits the workflow without actioning, the math window can be hidden Download: AsciiMath.alfredworkflow
In our code we tend to have lots of pixel tweaking resulting in lines like: thing.x = 120+2+3+5-1 I wanted a fast way to solve it to: thing.x = 129 So I made this lil' workflow. It uses the linux command "bc" (http://linux.about.com/od/commands/l/blcmdl1_bc.htm) so anything supported by that is supported by this. Select the text and press the hotkey (I have it to F13, but change to whatevs) and it replaces it with the answer. Download: http://db.tt/xiZXW2sP