Hacker News new | ask | show | jobs
by joppy 2767 days ago
I feel like this is the sweet spot for the editor to do some of the heavy lifting, for example being able to type "\alpha" and have the editor automatically transform it into the symbol α. I write a lot of LaTeX, and I would absolutely love an editor which could just transparently deal with all of the underlying mathematics markup so I would never have to see it again, and just directly edit the damn equations. Serialising and unserialising mathematics markup mentally is basically the antithesis of mathematical notation.
6 comments

In case you haven't already heard of it, LyX [1] does exactly that and it's phenominal. As an added bonus, when you move your cursor out of the equation it goes from a graphical almost-right visualisation to a proper LaTeX-generated absolutely-right preview, and manages other related LaTeX things like heading levels with a live clickable outline.

The big disadvantage to LyX is that it's not LaTeX editor but a LaTeX generator. So if you want to write your next article or dissertation and can commit to it then it's great, but if you want to import work so far or collaborate with someone not using LyX then it doesn't really work (it has an import function but it's almost unusable).

[1] http://www.lyx.org/

I've actually had good luck round-tripping lyx-latex-lyx repeatedly to collaborate with lyx-phobic co-authors. (As long as they don't mind equations they typed getting auto-formatted, etc.)
The julia interpreter does this. Or you have to press tab to do the transformation.
Emacs already has you covered. Good old C-x RET C-\ TeX will switch your input method to TeX, converting \alpha etc to unicode alpha, etc for most math symbols. Additionally, ^[char] or _[char] will become superscript/subscript unicode chars.

Once you've done that once in the session, you can just hit C-\ to toggle it on and off (C-x RET C-\ [input method] actually lets you select from a wide variety of input methods, and C-\ toggles on and off the most recently selected input method).

There are some editor plugins that do something like this. I know for Vim there is tex-conceal (https://github.com/KeitaNakamura/tex-conceal.vim), which collapses a lot of LaTeX symbols to their Unicode equivalent on lines other than your current line. It's a nice middle-ground, though far from perfect.
I use LaTeX with unicode-math regularly and I use emacs with quail mode to do exactly this.