>I always found it boring and a pain to write some mathematical formulaes in latex. Mainly those with a lot of \frac{x}{Y} stuff.
:)
This is what keybinds were invented for. I feel really silly for saying this but I made a huge list of custom keybinds only then finding out that the default keybinds in Vim-LaTeX-Suite are super good.
For example
>`/
backtick slash, expands to
>\frac{<++>}{<++>}<++>
where <++> are so called bullets that you can jump to with <C-j>. Another example
>`a
expands to
>\alpha
and all the other letters work as well (`b to \beta, `g to \gamma, etc.). Look into it, it makes typing LaTeX a breeze!
I dislike the latex math syntax per the reasons stated in the github article. I also like the idea of being able to output polynomials from a math calculation in python without having to roll my own latex pretty printer (many libraries exist here, but given my infrequent use case I like to keep things as simple as possible).
If I'm honest, I had only thought of intermixing tex with other constructs from the web (e.g. Markdown) and 'lax' gave me the idea to look around. I found a few more tidbits:
Here, I suspect that alpha is intended to be a single identifier. Yet, TeX will typeset this as a product of the five terms a, l, p, h and a.
Note how in the case of sqrt, there is a special control sequence \sqrt and not just a clump of four letters. Without the backslash, it would just be the product term s q r t.
You need something like \text{alpha} or whatever is the correct approach; not sure about this.
But then you have an ambiguity in your source language: why is xyz a product of terms, but alpha a single term.
You might need some notation like \alpha which will mean "the clump of letters which follows is a unit". Your code can decide whether this is something standard like sin, so that \sin can map to \sin, or whether it is nonstandard, requiring treatment like \alpha -> \text{alpha}.
Or other ideas: let the user define the symbols, and use "maximal munch": take the longest consecutive sequence of letters that exists as an entry in the user's dictionary of variables and functions.
:)
This is what keybinds were invented for. I feel really silly for saying this but I made a huge list of custom keybinds only then finding out that the default keybinds in Vim-LaTeX-Suite are super good.
For example
>`/
backtick slash, expands to
>\frac{<++>}{<++>}<++>
where <++> are so called bullets that you can jump to with <C-j>. Another example
>`a
expands to
>\alpha
and all the other letters work as well (`b to \beta, `g to \gamma, etc.). Look into it, it makes typing LaTeX a breeze!