RETIRED — superseded by Plurimath
This repository was archived on 2026-11-02 and is no longer maintained. Its functionality — converting UnicodeMath to LaTeX — is fully subsumed by Plurimath, which parses UnicodeMath (UTN28) natively and writes LaTeX.
Gem usage:
require "plurimath"
formula = Plurimath::Math.parse("x^2+y_1", :unicode)
formula.to_latex # => "x^{2} + y_{1}"CLI usage:
plurimath convert --input-format unicode --output-format latex --input "x^2+y_1"Documentation: the formal specifications for every supported format live at https://plurimath.github.io/docs/ . ## DEPRECATION NOTICE: This repository is no longer maintained. Please visit Plurimath for the latest updates and features.
unicode2latex
Gem for translating UTF8 Unicode characters to LaTeX escapes
require "unicode2latex"
latex = 'M =
\begin{bmatrix}
-\sin λ_0 & \cos λ_0 & 0 \\
-\sin φ_0 \cos λ_0 & -\sin φ_0 \sin λ_0 & \cos φ_0 \\
\cos φ_0 \cos λ_0 & \cos φ_0 \sin λ_0 & \sin φ_0
\end{bmatrix}'
Unicode2Latex.unicode2latex(latex)
>> M =
\begin{bmatrix}
-\sin \lambda_0 & \cos \lambda_0 & 0 \\
-\sin \varphi_0 \cos \lambda_0 & -\sin \varphi_0 \sin \lambda_0 & \cos \varphi_0 \\
\cos \varphi_0 \cos \lambda_0 & \cos \varphi_0 \sin \lambda_0 & \sin \varphi_0
\end{bmatrix}