After clearing the browser cache and restarting
Gmail, you should see the
collapsible GmailTeX menu in the Gmail
Navigation Bar on the left.
(If you used the alternative installation, you need to click on the
newly created Gmail bookmarklet first.)
The menu should have the following items:

- rich math (F8)
- simple math (F9)
- auto:
**off** 1 2 4 8, **rich** / simple
- help & about

### Reading email

When you receive an email containing LaTeX-encoded math, hit the
link **simple math** or **rich math**, or press **F9**,
resp. **F8**. LaTeX in your emails will be transformed into something
more readable (only temporarily, until you close the message).

For **rich math** to work, LaTeX must be properly enclosed in
$...$ or $$...$$. For **simple math**, it does not have to be: the
program will guess which part is math, and which part is not.

The **simple math** method only supports a subset of LaTeX (subscripts,
superscripts, greek letters, \sqrt, \sum, \prod, \cap, \cup, etc.)
and may not work on every input (after all, it is guessing). But it
is useful when you receive an email with pseudo-LaTeX which is not
enclosed in proper delimiters.

### Sending email in "Rich format" mode

The easiest is to compose an email in **Rich format**. Hitting
the link or **rich math** or pressing F8
will transform
your LaTeX into images with equations.

**To turn an image back into LaTeX,** do the following:
single-click the image to select it. Now double-click it to turn
it
back into plain text. Aim for the blue corners instead of
double-clicking on the center of the image.

If you are composing using new Compose/Reply, make sure you are NOT in "Plain text mode"!

Hitting the link **simple math** or pressing F9 will transform
your LaTeX into simple HTML with subscripts, superscripts, greek
letters etc.
Ctrl-Z works for "undo".

Exactly the same as for reading,
for **rich math** to work, LaTeX must be properly enclosed in
$...$ or $$...$$. For **simple math**, it does not have to be: the
program will guess which part is math, and which part is not.

Occasionally, after hitting F9 you may have trouble exiting out of
subscript or superscript mode.
(Pro tip: putting a dot "." after a superscript or subscript before
hitting F9 works well to avoid this problem.)
If it happens, select the text that should not be subscripted or
superscripted, and press the button "Remove Formatting" from Gmail
HTML editor's toolbar.

Whichever method you use, your addressee does not
need to have GmailTeX installed. The math should be directly
viewable in most browsers, including mobile browsers.

Here are some things to consider when choosing between HTML or
images in the outgoing emails:

**simple math** is just standard HTML, which any browser or email
client can read, online or offline.
**rich math** means links to images hosted by CodeCogs on
their server, and used in this app with their explicit
permission. The images are not available offline, unless they have
been cached by your computer.
- If a server goes down or the service is discontinued (as
Google's LaTeX engine is going to do soon), the images will
no longer render.
- The server at CodeCogs has a
daily fair usage
limit, currently 3,000 equations (per IP address?)

Note:

- Color works with F8. Try writing $\color{Red}{\mathbb C^n}$
and pressing F8 to get .
Other available colors: Blue, Green, Yellow, Pink, Orange,
Purple, Maroon, Teal.
- TeX accents work with F9. Try writing H\'el\`ene and pressing
F9 to get Hélène.

### Sending email in "Plain Text" mode

When composing in **Plain Text mode**, pressing F8 will open a
preview window for your LaTeX (and Shift-F8 will close it).
**The email is sent out as is, without any modifications.** To
view math nicely typeset, your addressee also needs to have GmailTeX
installed.

Now that there is a WYSIWYG way of sending emails, I may remove this method.

### auto: **off** 1 2 4 8, **rich** / simple

Turning this on produces the following effect. When composing a
message, math expressions properly enclosed in $...$, $$...$$,
\(...\), or \[...\] will be automatically typeset. If the rich mode
is chosen, they will be replaced by (links to) images. If the simple
mode is chosen, they will be replaced by simple HTML.

Thus, this is roughly equivalent to pressing F8 or F9 every 1, 2, 4,
or 8 seconds. But not quite. When you press F9, the whole text of
the message is transformed, including math expressions and TeX
accents not properly enclosed in $...$, etc. In the auto mode, only
the expressions in $...$ etc. are affected.

A side note is that in the auto mode, when the simple mode is
chosen, GmailTeX adds a blank space at the end of the
formula. Otherwise, Gmail frequently gets stuck in the subscript or
superscript mode. Once you know about this, with a little practice
this should not be an inconvenience.

Novice LaTeX users may also find CodeCogs'
Online LaTeX
Equation Editor useful. The link is available at the bottom of
GmailTeX's window. You can compose your formula there and then paste
it in the Compose window.

### Support for theorem-like environments

Writing

\begin{theorem}The equation $$x^n+y^n=z^n$$ has no solutions in positive integers x,y,z,n with $n\ge3$. \end{theorem}

produces

**Theorem. **The equation

x^{n}+y^{n}=z^{n}

has no solutions in positive integers x,y,z,n with

n≥3.

Note that '\begin{theorem}...\end{theorem}' should

**not** be enclosed in
$$...$$. On the other hand, the usual math environments such as matrix,
pmatrix, bmatrix, still work as before in Rich Math mode if they are
properly enclosed in $$...$$.

There is an optional argument for the theme: red, blue, green,
gray, yellow (default). For example,
writing

\begin{theorem}{green}The equation $$x^n+y^n=z^n$$ has no solutions in positive integers x,y,z,n with $n\ge3$. \end{theorem}

gives

**Theorem. **The equation

x^{n}+y^{n}=z^{n}

has no solutions in positive integers x,y,z,n with

n≥3.

The optional argument can also be used to add
any legal

CSS. In
particular, for the color names you can use something like

#FFFFF0
or rgb(248,248,248), or

named
colors. See also

this
page for a large database of colors. For example,

\begin{theorem}{background: pink; border: 2px solid crimson;
font-family: 'Times New Roman'; font-size: 120%; border-radius:2ex}The equation $x^n+y^n=z^n$
has no solutions in positive integers x,y,z,n with $n\ge3$.
\end{theorem}

gives

**Theorem. **The equation

x^{n}+y^{n}=z^{n}

has no solutions in positive integers x,y,z,n with n≥3.
For a box without a title, use
'\begin{} ... \end{}'. Works both in Simple and Rich
modes.

If you need to insert a line break inside an environment, **do
not** press ENTER, since it performs a complicated function in
Gmail Compose Box, with various side
effects. Press **SHIFT-ENTER** (in Chrome) or **CTRL-ENTER**
(in Safari) instead. There must be an equivalent in Firefox but I
haven't figured it out.
If things go wrong, you can use Gmail Undo
(control-Z).

### More formatting options

In addition, the main function of the **Simple Math mode** is to make
any expression in $...$ into an HTML span. As a byproduct, most
HTML constructions inside $...$ produce correctly-formatted HTML, e.g.

$<b>Bold</b>, $<i>Italic</i>, <del>Strike-through</del>$

give

**Bold**,

*Italic*,

~~Strike-through~~
when Simple Math mode is used.
$<h2>Headers</h2>$ work, too. Also, $----$ (four or more)
gives a horizontal line, $--$ gives an n-dash –, and $---$ an
em-dash —. And of course TeX accents work, too: $H\'el\`ene$
gives Hélène.

### Using LaTeX with Chat

Just include your math in $...$ or $$...$$. It should automatically
show upon entering.