A mathquill-like interactive math input in a terminal, built with the charm TUI library.
Keybinds:
- Arrow keys/
Ctrl+b/f/n/p
for basic cursor navigation Alt
+ left/right to start or extend selection- in selection mode, parenthesis
(
/)
and divide/
keys will wrap the selected block in the corresponding command
- in selection mode, parenthesis
Tab
to go out a block- Press
\
to enter a\command
(e.g.\alpha
or\frac
), when you're done, hitSpace
. While entering a command, you can hitTab
to see a list of available commands (there's no autocomplete, you still have to type it out yourself) Enter
for a new equation in a new lineCtrl+k
to go to previous line,Ctrl+j
to go to next line
There is no standard support table or even a goal, if I ever feel like turning this into a serious project, I would start from KaTeX, but that probably won't happen :P.
Take a look at command_def.gofor a list of all recognized latex commands.
I started this project when I was learning parsing, and this remains as a toy project in which I add stuff when I feel like doing so. Feature requests and whatnot is welcome, but I probably won't do anything.
Other interesting stuff I might try in the future:
- reactive-programming styled rendering
- undo
- autocomplete
- using parsing libraries for a declarative approach
- go-specific memory optimizations
- rendering on other, non-TUI platforms (WASM!)