# 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
@Caramdir, is it complicated to install this Neo layout? How would you do it in a GNU/Linux system, like Ubuntu or Fedora? –  alfC Apr 16 at 19:25
@alfC: It should come pre-installed. Just go to the keyboard settings in your desktop environment and you should find it under GermanNeo 2 (or something similar). For use in the shell directly (without X running) look up in the documentation of your distribution how to change the keyboard layout. –  Caramdir Apr 17 at 16:23
@alfC: If you can read German you'll find more information on their official site (neo-layout.org). Also be aware that a standard English (physical) keyboard will have the right Mod3 button in the wrong location and is missing the left Mod4 button altogether. –  Caramdir Apr 17 at 16:28
show 1 more comment

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? – Tyler Lawson 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) – Loop Space Feb 20 '11 at 14:39 add comment 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) - For the record, this is what I ended up using: a combination of the "It's All Text" extension for Firefox with Emacs set up to input text files in TeX mode. It works well. I wish I still had AUCTeX shortcuts, and there are a few symbols that I miss (the \Bbb array of characters is a little thin). – Tyler Lawson Nov 22 '13 at 23:11 Nice. Why not use AUCTeX then? It's Emacs, after all, and you can configure it to your taste. You may either (a) assign some key binding to LaTeX-mode (which starts AUCTeX), or (b) configure "It's All Text" so that it starts Emacs in AUCTeX mode (I think at least that it should be possible, I don't use it (yet)). – mbork Nov 23 '13 at 9:47 And yet another thought: it's quite possible that Org-mode can export LaTeX markup to Unicode. And Org-mode is pretty awesome for lightweight markup (I personally use it sometimes to write emails, which I then copy to my email client. It' probably a shame I don't use Gnus, but I only have this much time to configure my stuff...). – mbork Nov 23 '13 at 9:50 So you can certainly turn AUCTeX mode on (I tried), but it turns out that, if you're not actually inputting the keystrokes, the shortcuts for \alpha etc don't have their text interpreted by tex-input-mode. This I'm less sure how to fix (I also only have so much time to configure my stuff). – Tyler Lawson Nov 23 '13 at 14:15 so far as Org-mode, I use that too. But my personal experience is that as the number of tools needed to write the email increases, the chance that I'll actually use them drops off sharply. – Tyler Lawson Nov 23 '13 at 14:17 show 1 more comment 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. - add comment Here's another Unicode <-> LaTeX conversion tool http://www.johndcook.com/unicode_latex.html Courtesy of John D. Cook - add comment Here's yet another option: unicode it. - add comment For Gmail users, the quickest way to convert LaTeX to a mixture of unicode + html must be the following addon called "GmailTeX": http://alexeev.org/gmailtex.html It is currently available for Chrome, Firefox, Safari and Opera. Once installed, you can simply type$G\rtimes_\phi H\$ to obtain G ⋊φ H, with φ displayed as a subscript via html markup.

-