# Converting LaTeX into Unicode for email

My standard procedure for writing mathematical email has been to use pidgin-LaTeX for some time now, and many of those I communicate with do the same. However, someone I know has recently started a few Unicode symbols for standard operations (arrows, etc) into the mix and this seems to greatly improve the readability.

When I've tried to do this, I spent a lot of time opening webpages looking for appropriate Unicode symbols and copy-pasting them. This roughly doubles my writing time. In an ideal world I could hit some kind of conversion button, or in a less ideal world I could put together a toolbar of commonly-used symbols.

Are there any methods for easily looking up some standard LaTeX symbols as Unicode, and further for doing so in an easily-accessible manner?

-
This is one of the reason why I use the Neo keyboard layout which has Greek letters and all kinds of mathematical symbols on it (e.g. →,∞,⊗,∫,ℝ, etc.). – Caramdir Feb 19 '11 at 22:02
One might perhaps write a short search-replace script for doing so. – ipavlic Feb 19 '11 at 22:04

You may hit M-x describe-input-method RET TeX RET in Emacs. Here is a fragment of what you get:

\"x ẍ    \^h ĥ    \~e  ẽ    \=\AE Ǣ    \euro €    \doteq ≐    \square  □    \spadesuit  ♠    \vartriangleleft     ⊲
\"y ÿ    \^i î    \~i  ĩ    \=\ae ǣ    \e{e} ė    \equiv ≡    \subset  ⊂    \subseteqq  ⊆    \circlearrowright    ↻
\'A Á    \^j ĵ    \~n  ñ    \={A} Ā    \flat ♭    \frac1 ⅟    \succeq  ≽    \subsetneq  ⊊    \downrightharpoon    ⇂
\'C Ć    \^o ô    \~o  õ    \={E} Ē    \flqq «    \frown ⌢    \supset  ⊃    \supseteqq  ⊇    \ntrianglerighteq    ⋭


(By the way, this input method might be a nice way to actually type your emails - you type the TeX way, Emacs converts it to Unicode on the fly. And you don't have to use Emacs as your email client - even though it's a reasonable option - since you may configure it as an external editor in your MUA)

-

Here's another Unicode <-> LaTeX conversion tool

http://www.johndcook.com/unicode_latex.html

Courtesy of John D. Cook

-

A tool for converting LaTeX to Unicode is available at

http://vikhyat.net/stuff/latex_to_unicode/

I’m guessing it’s similar to the script mentioned in Andrew Stacey's answer. However, in case you’re using Chrome, you can also download an extension from said site that lets you convert LaTeX to Unicode using just the context menu.

-

Following on from ipavlic's comment to the main question, here's a script that I threw together for almost exactly this purpose:

http://www.math.ntnu.no/~stacey/code/latexToUTF/utf.php

It was actually for typing unicode into webpage text boxes rather than email. The link there goes to a working implementation (the difference between "submit" and "ajax" is that the ajax method builds up a list of all the ones that you've done, useful if you do the same one over and over again, whereas submit starts afresh each time). If you drop the '/utf.php' from the web address then you're left with the location of a BZR repository for the code so you can get it and mess around with it as you like.

There is allegedly an extension to detexify that will give you the unicode instead of the LaTeX symbol, but I haven't seen a working version of it so can't comment further.

-
 Thanks! One minor thing: I get an XML parse error for certain elements. It looks like the code on line 2248 should maybe end in symbols_one[\$i] rather than symbols_one? – coarsemoduli Feb 20 '11 at 2:23 @coarsemoduli: Absolutely correct - thanks for the bug report. Just shows how often I use that for things like \nabla! (I use it mainly for accented characters) (Fixed now) – Andrew Stacey Feb 20 '11 at 14:39