gjtorikian / mathematical

Convert mathematical equations to SVGs, PNGs, or MathML. A general wrapper to Lasem and mtex2MML.
https://gjtorikian.github.io/mathematical/
MIT License
166 stars 31 forks source link

Bad Rendering (fonts issue?) #110

Open hybras opened 1 year ago

hybras commented 1 year ago

Many latex items do not render correctly, including but limited to binomial coefficients and square roots. Conversion does not fail.

require "mathematical"
math = Mathematical.new({:format => :svg})
pi_svg = math.render("$\\sqrt{n}$")
File.open("pi.svg", mode: "wx") { |file| file.write(pi_svg[:data]) }

Render:

pi

Diagnostic Information:

OS: MacOS Venture 13.0.1 (I have been having this issue for weeks, since before upgrading to ventura) Ruby: 3.1.3 (from homebrew) Mathematical: 1.6.X (not exactly sure how to read gemfile version constraints) Fonts: