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 LaTeX symbol names preceded by \ with the corresponding Unicode symbol, using the hotstring
AutoHotkey feature. 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
Best Answer
I use a javascript bookmarklet for typing unicode symbols at math.stackexchange.com. Mathjax renders most unicode the same as the corresponding latex macros. For example
$ℝ$
and$\mathbb{R}$
give the same result. I like the way tex code stays more compact and readable with unicode symbols.I think this code is able to do what you want. I like to use not too many keystrokes, so instead of
\alpha
I use\a
to produceα
. You can modify this script to your own needs, and then convert it to a bookmarklet, using this website for example: http://jasonmillerdesign.com/Free_Stuff/Instant_Bookmarklet_ConverterIf you want to use this script on a website without jquery, then you first need to run this bookmarklet: http://www.learningjquery.com/2006/12/jquerify-bookmarklet/