Math-Mode

Math character set viewer mode
Variables:
----------
- math-mode:
t when math-mode is on, nil otherwise
- MODE-math-mode-font: [if bound]
Font to use in math-mode with major mode MODE
- math-mode-font: [default ()]
Font to use in math-mode if MODE-math-mode-font unbound
- math-mode-hook: [default ()]
Functions called when entering math-mode
- math-mode-exit-hook: [default ()]
Functions to call when exiting math-mode
- math-mode-user-context-map:
User key bindings list.
context-map = <list-of>(context command-key action)
context     = <string> text before the cursor
command-key = <string> key to hit to replace text
action      = <string> replacement text| <symbol> function
* Ex: ("50" "%" "half")
Type "50", then "%". Now, "50%" is replaced with "half"
Type "49", then "%". Now, all you have is "49%"...
* If the action is a function symbol, it is called when
the context string precedes the cursor and the command-key
is typed.
- math-mode-user-abbrev-TeX-map:
User abbrev/TeX-translation list
abbrev-TeX-map = <list-of>(mode-text <list-of>TeX-text)
mode-text      = <string> mode text used for translation
TeX-text       = <string> TeX text used for translation
* It is the first TeX-text in the list that is used for
translation to TeX.
* If TeX-text is a word (i.e. contains only letters), then
mode-text is defined as an abbreviation for \TeX-text
* Ex: ("<>" "\not=" "neq")
When translating from math-mode to TeX, "<>" is replaced
with "\not=". When translating from TeX to math-mode,
both "\not=" and "\neq" are replaced with "<>". Moreover,
"\neq" is defined as an abbreviation for "<>".

- math-mode-string: [default Math]
String used in the mode line
- math-mode-TeX-file: [default ()]
If non-nil translate before saving. Otherwise save the
buffer as is (default).
- math-mode-TeX-auto: [default ()]
If non-nil translate back and forth to TeX when toggling
math-mode. Otherwise do nothing (default).
- viewer::TeX-ext: [default ()]
If non-nil, then use LaTeX viewer extensions to
std-abbrev-TeX-map and std-context-map, else do nothing
(default). When non-nil, it has the same effect as:
  (require 'viewer/LaTeX)
  (setq fmath-mode-user-abbrev-TeX-map
        (append fmath-mode-user-abbrev-TeX-map
                LaTeX::viewer-user-abbrev-TeX-map
                LaTeX::viewer-std-abbrev-TeX-map))
  (setq fmath-mode-user-context-map
        (append fmath-mode-user-context-map
                LaTeX::viewer-user-context-map
                LaTeX::viewer-std-context-map))

Constants:
----------
- math-mode-std-abbrev-TeX-map:
Built-in abbrev/TeX-translation list. Override this variable
if you want to control everything as the effective
abbrev-TeX-map used is:
  (append math-mode-user-abbrev-TeX-map
          math-mode-std-abbrev-TeX-map)
- math-mode-std-context-map:
Built-in key bindings list. Override this variable if you
want to control everything as the effective context-map
used is:
  (append math-mode-user-context-map
          math-mode-std-context-map)

Functions:
----------
- math-mode:
* Without argument, toggle math-mode.
* With numeric argument, set math-mode if it is positive,
  reset math-mode otherwise.
Remember all viewer modes may be defined as autoloadable
using: (load "viewer/autoload")
- TeX-to-math:
tex-to-math:
Convert TeX macros to math-mode characters.
- math-to-TeX:
math-to-tex:
Convert math-mode characters to TeX macros.
- math-mode-help:
Show math-mode documentation, bindings and abbreviations.
* Without argument, show information in *Help* buffer.

* With argument 'LaTeX [max-table-size], show information
in LaTeX format. Compile with math.tex or
translate to TeX before saving.
Warning: If viewer::TeX-ext is non-nil, translation
does not work because it affects \begin and \end.

Extensions (viewer/LaTeX):
---------------------------
- LaTeX::viewer-std-abbrev-TeX-map:
Built-in LaTeX short-cut abbrev-TeX-map used when flag
viewer::TeX-ext is non-nil (see LaTeX for content).
- LaTeX::viewer-user-abbrev-TeX-map:
User abbrev-TeX map (before std map if provided)
- LaTeX::viewer-std-context-map:
Built-in LaTeX short-cut context-map. used when flag
viewer::TeX-ext is non-nil (see LaTeX for content).
- LaTeX::viewer-user-context-map:
User key bindings (before std map if provided)
- LaTeX-math-mode:
Sets LaTeX mode together with math-mode.

.emacs example:
---------------
(require 'decor)
(setq LaTeX::decor-preset t)
(load "viewer/autoload")
(setq fmath-mode-user-context-map
      '(("s" "@" "\345_{i=}^{}")))
(setq viewer::TeX-ext t)
(setq LaTeX::viewer-user-context-map
      '(
        ("\275" "c" "\275{corollary}")
        ("\275" "d" "\275{definition}")
        ("\275" "D" "\275{description}")
        ("\275" "l" "\275{lemma}")
        ("\275" "p" "\275{property}")
        ("\275" "P" "\275{proof}")
        ("\275" "t" "\275{theorem}")
        ))
(push '("\\.tex$" . LaTeX-fmath-mode) auto-mode-alist)

Math-Mode bindings

Context Key Binding
^0  ^{0}
0 @ ^{0}
^1  ^{1}
1 @ ^{1}
^2  ^{2}
2 @ ^{2}
^3  ^{3}
3  @  ^{3}
..  .  …
a  %  α
b  %  β
c  %  χ
d  %  δ
e  %  ε
f  %  ϕ
g  %  γ
h  %  η
i  %  ι
j  %  φ
k  %  κ
l  %  λ
m  %  μ
n  %  ν
o  %  o
p  %  π
q  %  θ
r  %  ρ
s  %  σ
t  %  τ
u  % \upsilon
v  %  ϖ
ω  @  ϖ
w  %  ω
x  %  ξ
y  %  ψ
z  %  ζ
A  %  A
B  %  B
C  %  X

Context Key Binding
D  %  Δ
E  %  E
F  %  Φ
G  %  Γ
H  %  H
I  %  I
J  %  ϑ
K  %  K
L  %  Λ
M  %  M
N  %  N
O  %  O
P  %  Π
Q  %  Θ
R  %  P
S  %  Σ
T  %  T
U  %  Υ
V  % \varsigma
W  %  Ω
X  %  Ξ
Y  %  Ψ
Z  %  Z
+  −  ±
+  ±
x  @  ×
∗  @  ×
/  @  ÷
%  @  ÷
@  @  •
.  @  ·
∪  @  ∩
U  @  ∪
∩  @  ∪
v  @  ∨
∧  @  ∨
^@  ∧
∨  @  ∧
< >  @  ⋄
+  @  ⊕

Context Key Binding
×  @  ⊗
!  −  †
†  −  ‡
!  =  ‡
=  <  ≤
<  ≤
≥  @  ≤
>  =  ≥
>  ≥
≤  @  ≥
<  <  ≪
≫  @  ≪
>  >  ≫
≪  @  ≫
)  @  ⊃
⊂  @  ⊃
(  @  ⊂
⊃  @  ⊂
⊂  /  ⊄
⊂  =  ⊆
⊂  ⊆
⊇  @  ⊆
⊃  =  ⊇
⊃  ⊇
⊆  @  ⊇
e  @  ∈
ε  @  ∈
∈  /  ∉
=  =  ≡
=  ≡
∼  ∼  ≈
=  ∼  ≅
=  /  ≠
a  @  ∝
α  @  ∝
|  @  |
<  −  ←
→  @  ←
−  >  →
←  @  →

Context Key Binding
← > ↔
^|  ↑
↓  @  ↑
↑  @  ↓
=  >  ⇒
⇐  @  ⇒
<  =  ⇐
⇒  @  ⇐
⇐  >  ⇔
|  |  ⇑
↑  |  ⇑
⇓  @  ⇑
↓  |  ⇓
⇑  @  ⇓
N  @  ℵ
P  @  ℘
R  @  ℜ
I  @  ℑ
”  ”  ′
’  @  ′
O  /  ∅
D  @  ∇
T  @  ⊥
|  ⊥
/  ^{}
/  ^{}
A  @  ∀
E  @  ∃
∼  @  ¬
−  @  ¬
d  @  ∂
8  @  ∞
oo  @  ∞
p  @  ∏
Π  @  ∏
s  @  ∑
Σ  @  ∑
i  @  ∫
$  @  ∫
V  @  √

Context Key Binding
{  @  {
}  @  {
}  @  }
{  @  }
[  ⌊
⌋ @ ⌊
]  ⌋
⌊ @ ⌋
^[  ⌈
⌉ @ ⌈
^]  ⌉
⌈  @  ⌉
>  @  ⟩
⟨  @  ⟩
<  @  ⟨
⟩  @  ⟨

Math-Mode abbrevs

Abbrev  Expansion
\zerosuperior ^{0}
\onesuperior ^{1}
\twosuperior ^{2}
\threesuperior ^{3}
\ldots  …
\alpha  α
\beta  β
\chi  χ
\delta  δ
\varepsilon  ε
\phi  ϕ
\gamma  γ
\eta  η
\iota  ι
\varphi  φ
\kappa  κ
\lambda  λ
\mu  μ
\nu  ν
\pi  π
\theta  θ
\rho  ρ
\sigma  σ
\tau  τ
\vartheta  ϑ
\varpi  ϖ
\omega  ω
\xi  ξ
\psi  ψ
\zeta  ζ
\Delta  Δ
\Phi  Φ
\Gamma  Γ
\Lambda  Λ
\Pi  Π
\Theta  Θ
\Sigma  Σ
\Upsilon  Υ
\Omega  Ω

Abbrev  Expansion
\Xi  Ξ
\Psi  Ψ
\pm  ±
\times  ×
\div  ÷
\bullet  •
\cdot  ·
\cap  ∩
\cup  ∪
\lor  ∨
\vee  ∨
\land  ∧
\wedge  ∧
\diamond ⋄
\oplus  ⊕
\otimes  ⊗
\dag  †
\ddag  ‡
\leq  ≤
\le  ≤
\geq  ≥
\ge  ≥
\ll  ≪
\gg  ≫
\subset  ⊂
\supset  ⊃
\notsubset ⊄
\subseteq ⊆
\supseteq ⊇
\in  ∈
\notin ∉
\equiv  ≡
\approx  ≈
\cong ≅
\neq  ≠
\ne  ≠
\propto  ∝
\mid  |
\leftarrow ←
\gets  ←

Abbrev  Expansion
\rightarrow  →
\to  →
\leftrightarrow ↔
\uparrow  ↑
\downarrow  ↓
\Leftarrow  ⇐
\Rightarrow  ⇒
\Leftrightarrow ⇔
\Uparrow  ⇑
\Downarrow  ⇓
\aleph  ℵ
\wp  ℘
\Re  ℜ
\Im  ℑ
\prime  ′
\emptyset  ∅
\nabla  ∇
\bot  ⊥
\angle  ^{}
\forall  ∀
\exists  ∃
\lnot  ¬
\neg  ¬
\partial  ∂
\infty  ∞
\prod  ∏
\sum  ∑
\int  ∫
\sqrt  √
\lbrace  {
\rbrace  }
\lfloor  ⌊
\rfloor  ⌋
\lceil  ⌈
\rceil  ⌉
\langle  ⟨
\rangle  ⟩