🔧 Added piecewise function latex alias
This commit is contained in:
parent
aa1fea2f0a
commit
5391a73d45
2 changed files with 21 additions and 0 deletions
|
|
@ -175,6 +175,16 @@ matches:
|
||||||
force_clipboard: true
|
force_clipboard: true
|
||||||
replace: "$$ x = \\frac{-(b) \\pm \\sqrt{(b)^2 - 4(a)(c)}}{2(a)} $$"
|
replace: "$$ x = \\frac{-(b) \\pm \\sqrt{(b)^2 - 4(a)(c)}}{2(a)} $$"
|
||||||
|
|
||||||
|
# prints out latex piecewise function
|
||||||
|
- trigger: ";piece"
|
||||||
|
force_clipboard: true
|
||||||
|
replace: "{{output}}"
|
||||||
|
vars:
|
||||||
|
- name: output
|
||||||
|
type: shell
|
||||||
|
params:
|
||||||
|
cmd: "~/scripts/piecewise ; echo ''"
|
||||||
|
|
||||||
- trigger: ";<h1"
|
- trigger: ";<h1"
|
||||||
force_clipboard: true
|
force_clipboard: true
|
||||||
replace: "<h1> </h1>"
|
replace: "<h1> </h1>"
|
||||||
|
|
|
||||||
11
scripts/piecewise
Executable file
11
scripts/piecewise
Executable file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Utilize in conjunction with espanso, call ;html5
|
||||||
|
cat <<EOM
|
||||||
|
\$$
|
||||||
|
f(x) =
|
||||||
|
\begin{cases}
|
||||||
|
x - 3 & \text{if } x \geq 3 \\
|
||||||
|
-(x - 3) & \text{if } x < 3
|
||||||
|
\end{cases}
|
||||||
|
\$$
|
||||||
|
EOM
|
||||||
Loading…
Add table
Add a link
Reference in a new issue