When dealing with equations, I often end up writing a lot of mathematical symbols using greek letters. This makes the equations very long and a bit hard to read in my editor. Assuming I could write greek letters such as κ very quickly (without having to type \kappa to get κ) is there any way to have latex interpret κ as \kappa so I can still get the same output?
Asked
Active
Viewed 581 times
2
1 Answers
5
A standard way is to use an engine which accepts unicode letters. The following example compiles with LuaLaTeX:
\documentclass{article}
\usepackage{amsmath,fontspec,unicode-math}
\setmainfont{Stix}
\setmathfont{Stix}
\begin{document}
\noindent{}Α, α, Β, β/ϐ, Γ, γ, Δ, δ, Ε, ε/ϵ, Ζ, ζ, Η, η, Θ, θ/ϑ, Ι, ι, Κ, κ/ϰ, Λ, λ, Μ, μ, Ν, ν, \\
Ξ, ξ, Ο, ο, Π, π/, Ρ, ρ/ϱ, Σ, σ/ς, Τ, τ, Υ, υ, Φ, φ/ϕ, Χ, χ, Ψ, ψ, Ω, ω, \\
Ϝ, ϝ, Ϛ, ϛ, ϗ, Ϟ, ϟ, Ͱ, ͱ, Ͳ, ͳ, Ϳ, ϳ, Ϡ, ϡ, Ϸ, ϸ, Ϲ, ϲ, Ϻ, ϻ.
\begin{align*}
&Α, α, Β, β/ϐ, Γ, γ, Δ, δ, Ε, ε/ϵ, Ζ, ζ, Η, η, Θ, θ/ϑ, Ι, ι, Κ, κ/ϰ, Λ, λ, Μ, μ, Ν, ν, \\
& Ξ, ξ, Ο, ο, Π, π/, Ρ, ρ/ϱ, Σ, σ/ς, Τ, τ, Υ, υ, Φ, φ/ϕ, Χ, χ, Ψ, ψ, Ω, ω, \\
& Ϝ, ϝ, Ϛ, ϛ, ϗ, Ϟ, ϟ, Ͱ, ͱ, Ͳ, ͳ, Ϳ, ϳ, Ϡ, ϡ, Ϸ, ϸ, Ϲ, ϲ, Ϻ, ϻ.
\end{align*}
Do note confuse ϟ (rather unknown glyph) with ᛋ (infamous rune).
\end{document}
I included some more obscure Greek letters just for comparison.
Yous should chose a typeface with math support when using this approach. I recommend an OTF typeface. A list of such typefaces is found on http://www.tug.dk/FontCatalogue/mathfonts.html. You should also consult the fine manuals of the packages used in the example.
Another fine engine is XeLaTeX.
CampanIgnis
- 4,624
-
1One difference here is that the lowercase Greek letters in math mode are italicized, and the ones in regular text are not. If the intent is to have a shorthand for particular variables in a regular text environment, this may not work without further modification. – Mike Renfro Nov 27 '18 at 19:18
-
@MikeRenfro That is true, but math content should always be written in math mode. This is also important when you use text figures in text. For the choice of math-style, I refer to section 5 of the manual. – CampanIgnis Nov 27 '18 at 19:29
-
2Agreed. If the goal is to write one character in math mode instead of 6, Unicode math is the way to go. – Mike Renfro Nov 27 '18 at 19:32

\usepackage{alphabeta}if using pdflatex – Nov 27 '18 at 20:31