Espanso Rocks for Math Documentation.
I play a lot of Kerbal Space Program.
This game sees a species of tenacious; albeit slightly dimwitted, little green men desperately clawing their way to the outer reaches of their solar system.
I like to challenge myself in this game by taking advantage of the realistic (though scaled down) math involved in calculating trajectories and fuel usage. This sees me using plenty of greek letters in the calculations. Notable examples being:
- μ: for gravitational constants of given bodies.
- Δv: for change in velocity.
- θ: for denoting unknown angles.
- π: this one is obvious.
The list goes on. That being said; I also enjoy collecting radioactive samples, and their respective spectra using a gamma spectroscopy device.
To cut to the chase, I got very tired copy and pasting the γ symbol from google every time I needed to use it.
So I looked for solutions; that's where I found Espanso. A free, open-source (FOSS) text expander that can utilize custom "listen-and-replace" strings. It sits quietly in the background, awaiting my typing of a certain keyword and auto-magically replaces it in real-time. For example; if I type :theta, I get θ. You get the idea.
The really helpful thing about Espanso is that it uses human-readable .yml code to handle the replacing. It can even pull variables from the system; so if I type :date, It returns the date. Some may say to just be an adult and use LaTeX, but on the fly being able to not have to.. well.. use LaTeX is really nice.
I painstakingly copy-pasted the full greek alphabet (upper and lowercase) into a matching config and will paste it below to make things easy for anyone looking for greek letters in Espanso. I even included the alternate word-ending variant of sigma ("ς"), if you're just looking for greek writing.
Remember that yml files take indenting into its syntax so make sure your indenting matches the original below or else things may not work.
To find where to paste this, first install Espanso, then run:espanso path
navigate to the "config" directory that it lists,
(commonly ~/.config/espanso)
This is on Linux, by the way. It will be a different path on windows or mac.
and paste the following into a new .yml document that you make there.
matches:
# lowercase greek letters
- trigger: ":alpha"
replace: "α"
- trigger: ":beta"
replace: "β"
- trigger: ":gamma"
replace: "γ"
- trigger: ":delta"
replace: "δ"
- trigger: ":epsilon"
replace: "ε"
- trigger: ":zeta"
replace: "ζ"
- trigger: ":eta"
replace: "η"
- trigger: ":theta"
replace: "θ"
- trigger: ":iota"
replace: "ι"
- trigger: ":kappa"
replace: "κ"
- trigger: ":lambda"
replace: "λ"
- trigger: ":mu"
replace: "μ"
- trigger: ":nu"
replace: "ν"
- trigger: ":xi"
replace: "ξ"
- trigger: ":omicron"
replace: "ο"
- trigger: ":pi"
replace: "π"
- trigger: ":rho"
replace: "ρ"
- trigger: ":sigma"
replace: "σ / ς"
- trigger: ":tau"
replace: "τ"
- trigger: ":upsilon"
replace: "υ"
- trigger: ":phi"
replace: "φ"
- trigger: ":chi"
replace: "χ"
- trigger: ":psi"
replace: "ψ"
- trigger: ":omega"
replace: "ω"
# uppercase greek letters
- trigger: ":Alpha"
replace: "Α"
- trigger: ":Beta"
replace: "Β"
- trigger: ":Gamma"
replace: "Γ"
- trigger: ":Delta"
replace: "Δ"
- trigger: ":Epsilon"
replace: "Ε"
- trigger: ":Zeta"
replace: "Ζ"
- trigger: ":Eta"
replace: "Η"
- trigger: ":Theta"
replace: "Θ"
- trigger: ":Iota"
replace: "Ι"
- trigger: ":Kappa"
replace: "Κ"
- trigger: ":Lambda"
replace: "Λ"
- trigger: ":Mu"
replace: "Μ"
- trigger: ":Nu"
replace: "Ν"
- trigger: ":Xi"
replace: "Ξ"
- trigger: ":Omicron"
replace: "Ο"
- trigger: ":Pi"
replace: "Π"
- trigger: ":Rho"
replace: "Ρ"
- trigger: ":Sigma"
replace: "Σ"
- trigger: ":Tau"
replace: "Τ"
- trigger: ":Upsilon"
replace: "Υ"
- trigger: ":Phi"
replace: "Φ"
- trigger: ":Chi"
replace: "Χ"
- trigger: ":Psi"
replace: "Ψ"
- trigger: ":Omega"
replace: "Ω"
Comments ()