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

Wrong size of underbraces #85

Closed RarrugasTetra closed 8 months ago

RarrugasTetra commented 6 years ago

Dear Developers, I have a problem with underbraces in my formulas; they are too small. Here is an example:

require 'mathematical'

var = Mathematical.new.render('$$\Phi = \underbrace{\sum_{i} \gamma_i \left( s_i M^{model}(s_i) - s_i M^{exp}(s_i) \right)}_{\Phi_{GED}} + \alpha \cdot \underbrace{ \sum_{j} \gamma_j \left( p_j^{model} - p_j^{QC} \right)}_{\Phi_{QC}} \rightarrow min$$')

File.open("test.svg", 'w'){|f| f.puts var[:data]}

You can run it and check the test.svg or you can see it here

How to fix this?

Thank you.

RarrugasTetra commented 4 years ago

Is there any chance to fix the problem?

4e554c4c commented 8 months ago

closing in favor of higher-quality issues #111