-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlatex-writing-assistant.ahk
177 lines (142 loc) · 2.96 KB
/
latex-writing-assistant.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
; # Win (Windows logo key)
; ! Alt
; ^ Control
; + Shift
; & An ampersand may be used between any two keys or mouse buttons to combine them into a custom hotkey.
; This script helps to quickly enter TeX, for instance, you enter "##f" and it turns immediately
; into "\frac{}{}" and puts the cursor on the right position
; Use three hash signs, e. g. "###f" to output inline TeX: "\( \frac{}{} \)"
; Enter "\\-" to get only inline TeX: "\( \)"
; Enter "##pq" to output the pq-formula and "##abc" to output the abc-formula
; Enter "##zz" for the Zinseszinsformel (compound interest formula)
:*?C:\\-::
String := "\( \)"
SendRaw %String%
Send {Left 3}
return
:*?C:###f::
String := "\( \frac{}{} \)"
SendRaw %String%
Send {Left 6}
return
:*?C:##f::
String := "\frac{}{}"
SendRaw %String%
Send {Left 3}
return
:*?C:###int::
String := "\( \int_{0}^{\infty} \)"
SendRaw %String%
Send {Left 10}
return
:*?C:##int::
String := "\int_{0}^{\infty}"
SendRaw %String%
Send {Left 10}
return
:*?C:###r::
String := "\( \sqrt{} \)"
SendRaw %String%
Send {Left 4}
return
:*?C:##r::
String := "\sqrt{}"
SendRaw %String%
Send {Left 1}
return
:*?C:###R::
String := "\( \sqrt[]{} \)"
SendRaw %String%
Send {Left 4}
return
:*?C:##R::
String := "\sqrt[]{}"
SendRaw %String%
Send {Left 3}
return
:*?C:###log::
String := "\( \log_{}{} \)"
SendRaw %String%
Send {Left 3}
return
:*?C:##log::
String := "\log_{}{}"
SendRaw %String%
Send {Left 3}
return
:*?C:###lim::
String := "\( \lim_{x\to\infty} \)"
SendRaw %String%
Send {Left 10}
return
:*?C:##lim::
String := "\lim_{x\to\infty}"
SendRaw %String%
Send {Left 10}
return
:*?C:###sum::
String := "\( \sum_{n=0}^{\infty}{n} \)"
SendRaw %String%
Send {Left 14}
return
:*?C:##sum::
String := "\sum_{n=0}^{\infty}{n}"
SendRaw %String%
Send {Left 14}
return
:*?C:###prod::
String := "\( \prod_{n=0}^{\infty}{n} \)"
SendRaw %String%
Send {Left 14}
return
:*?C:##prod::
String := "\prod_{n=0}^{\infty}{n}"
SendRaw %String%
Send {Left 14}
return
:*?C:###mat::
String := "\( \begin{pmatrix} a & b \\ c & d \end{pmatrix} \)"
SendRaw %String%
Send {Left 28}
return
:*?C:##mat::
String := "\begin{pmatrix} a & b \\ c & d \end{pmatrix}"
SendRaw %String%
Send {Left 28}
return
:*?C:###vec::
String := "\( \begin{pmatrix} x\\y\\z \end{pmatrix} \)"
SendRaw %String%
Send {Left 21}
return
:*?C:##vec::
String := "\begin{pmatrix} x\\y\\z \end{pmatrix}"
SendRaw %String%
Send {Left 21}
return
:*?C:##pq::
String := "x_{1,2} = -( \frac{p}{2} ) \pm \sqrt{ ( \frac{p}{2} )^{2} - q}"
SendRaw %String%
Send {Left 42}
return
:*?C:##abc::
String := "x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4·a·c}}{2·a}"
SendRaw %String%
Send {Left 29}
return
:*?C:##zz::
String := "K_n = K_0 \cdot (1+p)^n"
SendRaw %String%
Send {Left 14}
return
:*?C:###t::
String := "\( \text{} \)"
SendRaw %String%
Send {Left 4}
return
:*?C:##t::
String := "\text{}"
SendRaw %String%
Send {Left 1}
return
; END