- 中文版介绍:README_CN.md
- 这是一个用于简化
OneNote和Word中数学公式输入的AutoHotKey脚本,例如,\a代表$\alpha$ (\alpha)。
This is a script that simplifies math formula inputs in OneNote and Word with AutoHotKey script, e.g., \a for \alpha).
Demonstration video (Early version):
If the formulas aren't displayed correctly, go to README_EN.pdf.
- Download and run OneHotkey.exe.
- Input the code of the symbol, then press
Spaceto get the symbol. For example, input\aand pressSpaceto get$\alpha$ . - For editting the symbol mapping, please refer to Code Editing Guide. If you need help, go to the AutoHotKey official website.
- To stop the script, right click the
Hicon in the system tray and selectExit.
- OneHotkey: Faster Math Input in OneNote/Word
The script contains multiple symbol mappings, including Greek letters, math fonts, frequently used letters, and structures. The following is a list of some typical mappings. Make sure that you have entered the formula input mode with Alt+=.
If the formulas aren't displayed correctly, go to README_EN.pdf.
| Code | Output | Category | Source |
|---|---|---|---|
\a |
lowercase Greek letters | \alpha |
|
\D |
uppercase Greek letters | \Delta |
|
\R, \C, \Z, \N, \J
|
ℝ, ℂ, ℤ, ℕ, 𝕁 | frequently used letters |
\doubleR , ... |
\do X, \sc X, \fr X
|
𝕏, 𝒳, 𝔛 | fancy letter forms |
\doubleX , \scriptX , \frakturX
|
\m3, \m4, ... |
specific shape matrices | matrices |
[\matrix(@@&&)] , ... |
x\h, x\~, x\d2
|
|
modifiers |
\hat , \tilde , \ddot
|
\x, \X, \sq, \pa, \eq
|
|
operators |
\cdot , \times, \sqrt , \parallel , \equiv
|
\pd, \d, \dt, \inf
|
|
frequently used symbols |
\partial , "d" , "d" /"d" t , \infty
|
\limx, \limx0
|
$ \lim_{x \rightarrow \infty} $, $ \lim_{x \rightarrow 0} $ | limits |
lim_(x->\infty ) , lim_(x->0 )
|
\ls |
left super-and-lowerscript | ^_ P |
|
\i, \j, \k
|
|
imaginary/quaternion symbols |
"i", "j", "k"
|
\ejw |
complex exponential factor | e^j\omega |
You shall notice that (space) is commonly used, which is the key feature of OneNote formula input.
| Code | Output | Source | Code | Output | Source |
|---|---|---|---|---|---|
\pd |
\partial{Space} |
\d |
"d"{Space} |
||
\inf |
\infty{Space} |
\dt |
"d"{Space}/"d"{Space}t{Space}{Left 4}^i |
||
\R |
\doubleR{Space} |
\E |
\doubleE{Space}[]{Space}{Left} |
||
\Q |
\doubleQ{Space} |
\Z |
\doubleZ{Space} |
||
\N |
\doubleN{Space} |
\C |
\doubleC{Space} |
||
\J |
\doubleJ{Space} |
\n |
\nabla{Space} |
| Code | Output | Source | Code | Output | Source |
|---|---|---|---|---|---|
\x |
\cdot{Space} |
\X |
\times{Space} |
||
\sq |
\sqrt{Space 2}{Left} |
\pa |
\parallel{Space} |
||
\ss |
\subset{Space} |
\sse |
\subseteq{Space} |
||
\op |
\oplus{Space} |
\ox |
\otimes{Space} |
||
\od |
\odot{Space} |
\dd |
\ddots{Space} |
||
\cd |
\cdots{Space} |
\vd |
\vdots{Space} |
||
\map |
\mapsto{Space} |
\pro |
\propto{Space} |
||
\as |
\because{Space} |
\so |
\therefore{Space} |
||
\eq |
\equiv{Space} |
\deq |
\Deltaeq{Space} |
||
\xe |
\times{Space}10{^}{Space}{Left} |
\ex |
\exists{Space} |
||
\fa |
\forall{Space} |
\ppd |
\partial{Space}/\partial{Space 2}{Left 3} |
||
\ppd |
\partial{Space}/\partial{Space 2}{Left 3} |
| Code | Output | Source | Code | Output | Source |
|---|---|---|---|---|---|
\a |
\alpha{Space} |
\b |
\beta{Space} |
||
\e |
\varepsilon{Space} |
\ve |
\epsilon{Space} |
||
\de |
\delta{Space} |
\D |
\Delta{Space} |
||
\s |
\sigma{Space} |
\S |
\Sigma{Space} |
||
\l |
\lambda{Space} |
\L |
\Lambda{Space} |
||
\t |
\theta{Space} |
\T |
\Theta{Space} |
||
\p |
\phi{Space} |
\P |
\Phi{Space} |
||
\o |
\omega{Space} |
\O |
\Omega{Space} |
||
\g |
\gamma{Space} |
\G |
\Gamma{Space} |
-
vemeans variant epsilon. For convenience,\eis set to$\varepsilon$ and\veis set to$\epsilon$ , which is different from their original code.
| Code | Output | Source |
|---|---|---|
\m4 |
4 by 4 empty matrix | [\matrix(@@@&&&){Space}]{Space} |
\m3 |
3 by 3 empty matrix | [\matrix(@@&&){Space}]{Space} |
\m2 |
2 by 2 empty matrix | [\matrix(@&){Space}]{Space} |
\m |
empty matrix awaiting & @ to set size |
[]{Space}{Left}\matrix(){Left} |
| Code | Output | Source |
|---|---|---|
\d1 |
\dot{Space 2} |
|
\d2 |
\ddot{Space 2} |
|
\d3 |
3 dots above | \dddot{Space 2} |
\d4 |
4 dots above | \ddddot{Space 2} |
\~ |
\tilde{Space 2} |
|
\v |
\vec{Space 2} |
|
\h |
\hat{Space 2} |
|
\ub |
\underbar{Space 2}{Left} |
- For the above codes, you should input like
x\h.
| Code | Output | Source | Code | Output | Source |
|---|---|---|---|---|---|
\lr |
\leftrightarrow{Space} |
\Lr |
\Leftrightarrow{Space} |
||
\lrs |
\leftrightarrows{Enter}{Left} |
\la |
\leftarrow{Space} |
||
\La |
\Leftarrow{Space} |
\ra |
\rightarrow{Space} |
||
\Ra |
\Rightarrow{Space} |
\down |
\downarrow{Space} |
||
\up |
\uparrow{Space} |
| Code | Output | Source | Code | Output | Source |
|---|---|---|---|---|---|
\deg |
\degree{Space} |
\st |
\star{Space} |
- If the formulas aren't displayed correctly, go to README_EN.pdf.
| Code | Output | Source |
|---|---|---|
\r |
\right.{Left} |
|
\leb |
\left\box{Space 2}{Left} |
|
\ceil |
\lceil{Space}\rceil{Space 2}{Left} |
|
\floor |
\lfloor{Space}\rfloor{Space 2}{Left} |
|
\brak |
⟨⬚⟩ | \bra{Space}\ket{Space 2}{Left} |
\ls |
^_ P {Left 4} |
|
\ab |
\above{Space 2}{Left} |
|
\be |
\below{Space 2}{Left} |
|
\abb |
\overbrace{Space 2} |
|
\beb |
\underbrace{Space 2} |
|
\fu |
\funcapply |
|
\Norm |
\norm{Space}\norm{Space 2}{Left} |
|
\limx, \limx0
|
$ \lim_{x \rightarrow \infty} $, $ \lim_{x \rightarrow 0} $ |
lim_(x->\infty{Space}){Space}, lim_(x->0{Space}){Space}
|
\limt, \limt0
|
$ \lim_{t \rightarrow \infty} $, $ \lim_{t \rightarrow 0} $ |
lim_(t->\infty{Space}){Space}, lim_(t->0{Space}){Space}
|
\limn, \limk
|
$ \lim_{n \rightarrow \infty} $, $ \lim_{k \rightarrow \infty} $ |
lim_(n->\infty{Space}){Space}, lim_(k->\infty{Space}){Space}
|
\limh |
$ \lim_{h \rightarrow 0} $ | lim_(h->0{Space}){Space} |
\BO |
\boxed{Enter}{Left 2} |
|
\qu |
Quad space | \quad{Enter}{Left} |
\diverge |
Omitted | |
\gradient |
Omitted | |
\curl |
Curl matrix |
\funcapplyis a little different from\of. Have a try by yourself!
| Code | Output | Source |
|---|---|---|
\sc |
\script |
|
\do |
\double |
|
\fr |
\fraktur |
- For these mappings, your input should be like
\sc X.
| Code | Output | Source |
|---|---|---|
\eq2 |
Two-column equation | \eqarray(&=@&=){Space}{Left 6} |
\eqs |
Example equation array | \eqarray(a\quad&b@c\quad&e){Enter}{Left 11} |
Note: Multi-column equations are used for aligning multiple equations, using @ as placeholder and & as alignment point.
| Code | Output | Source |
|---|---|---|
\pf |
Proof structure | ^bProof.^b{Enter 2}!={Space}{#}\qed{Enter}{Left 7} |
\thm |
Theorem structure | ^bTheorem{Space}.^b^i{Space}{Left 2} |
\que |
Question structure | ^bQuestion{Space}.^b{Space}{Left 2} |
- Learn more about the math input from this document: UTN28-PlainTextMath-v3.pdf. Page 39~47 is useful.
- Input Unicode characters directly: https://github.com/gtj1/symbol_assist
- Intuitive Vim-like text cursor control: https://github.com/RUSRUSHB/AutoTextCursor
key_combination.exe
- Use key combinations to input special characters and structures
- Contains: Start formula inputting; Division line; Boxed text; Text block
rus_hotkey.exe
- Input Russian alphabets. They can be integrated into formula inputting.
- Format:
\+Romanized Alphabet+R - e.g.,
\dRgenerates д,\DRgenerates Д
For editing the mapping, please: Edit OneHotkey.ahk, compile it with Ahk2Exe, and run the compiled .exe file. You are recommended to learn more about AutoHotKey from its website.
The code of OneHotkey.ahk is very easy to understand, even if you have not learnt about AutoHotKey. For newcomers, the explanation of the code is as follows:
Each line of the code is a mapping of the input code to the output symbol. The format is :(parameters):input::output. For example, ::\a::\alpha means that when you input \a, the script will output \alpha .
The script uses global hotstring settings #Hotstring c o ?, which apply to all mappings:
| Parameter | Meaning |
|---|---|
c |
Case-sensitive. \a and \A are different. |
o |
Delete the Space you entered at the end. |
? |
Output formula even if you have typed something before the code. Otherwise, it will fail in cases like x\h |