# Replacing latex with unicode symbols

Often, during a conversation or an email, or at a forum, I would like to type some math, but I don't need full equation support. Unicode symbols should suffice.

What I need is an easy way to type math related unicode symbols. Since I already know latex, it makes sense to use the latex symbol mnemonics to type the math symbols.

What I currently did is to write an AutoHotKey script which automatically replaces \latexSymbol with the corresponding unicode symbol, using the "hotstrings" AutoHotKey feautres. However, the AutoHotKey hotstrings proved unstable for many strings. Having a couple of tens lines would cause AHK to fail recognizing the strings from time to time.

Any other solution? (No, Alt+unicode number isn't convenient enough)

Attached is my AHK script. The PutUni function is taken from here.

::\infty::
PutUni("e2889e")
return
::\sum::
PutUni("e28891")
return
::\int::
PutUni("e288ab")
return
::\pm::
PutUni("c2b1")
return
::\alpha::
PutUni("c991")
return
::\beta::
PutUni("c992")
return
::\phi::
PutUni("c9b8")
return
::\delta::
PutUni("ceb4")
return
::\pi::
PutUni("cf80")
return
::\omega::
PutUni("cf89")
return
::\in::
PutUni("e28888")
return
::\notin::
PutUni("e28889")
return
::\iff::
PutUni("e28794")
return
::\leq::
PutUni("e289a4")
return
::\geq::
PutUni("e289a5")
return
::\sqrt::
PutUni("e2889a")
return
::\neq::
PutUni("e289a0")
return
::\subset::
PutUni("e28a82")
return
::\nsubset::
PutUni("e28a84")
return
::\nsubseteq::
PutUni("e28a88")
return
::\subseteq::
PutUni("e28a86")
return
::\prod::
PutUni("e2888f")
return
::\N::
PutUni("e28495")
return

-

If I need it I just tend to type the math in Word and copy/paste. Word uses the same macros LaTeX uses by default and auto-converts them into proper Unicode. And I find the linear format there more readable than LaTeX markup.

Still, if your mail recipients read from some dumb terminal or without proper font support (on XP maybe) you probably want to just type up raw LaTeX instead of Unicode just to allow them to understand what you want to say.

-
First, I stated explicitly the use case. Online internet forum/chat. There's no sane webservice today that do not support UTF-8. I might not be able to use the more obscure symbols, but common machines with common unicode fonts has much more than I could use. I have no intention to support terminal, although xterm should be able to cope with that. About Word: (1) It works only with Office07, other math support lame. (2) I'm trying to avoid this context switch. What about chatting session? Alt-tab+Ctrl-C+Ctrl-v is not good enough. – Elazar Leibovich Jan 3 '10 at 15:20

You could use MSKLC to create a math-centric keyboard layout. For example eurokb includes symbols like ≡≤≠±∔π∜ on AltGr dead key combinations. (eurokb probably isn't math-heavy enough for you, but it might give you some ideas.)

-
 The only downside is, no mnemonics at all. I'll have to memorize tens of keyboard combinations. BTW I think you should include a simulation of the keyboard mapping of your eurokb map on its website, and not just in the distribution. That would be useful for testing it. – Elazar Leibovich Jan 4 '10 at 14:43 (I do: hit the UK or US documentation link and it's at the top.) Yeah, you would certainly have to come up with a logical way to arrange and remember the layout, but you've got quite a lot of latitude to play with when you can have any combination of two potentially-shifted-or-alted keys. The Greek letters you pretty much already have by doing as eurokb does and following the standard Greek keyboard layout (en.wikipedia.org/wiki/Keyboard_layout#Greek). Then you could group by function, eg. AltGr+S for set functions; AltGr+S,= for ∈, AltGr+S,/ for ∉, or whatever. – bobince Jan 5 '10 at 2:49

Type up a short LaTeX fragment and tell them to cut and paste it into http://www.numberempire.com/texequationeditor/equationeditor.php and press "Render". Example:

\begin{align*}
R_s &\;=\; \frac{\widehat{\sigma}_s}{K} \left(\sqrt{1 - \sum^{15}_{k=1} \beta_k^2} \right) G_s