Skip to content

Releases: verybadcat/CSharpMath

0.1.0 SkiaSharp Update Prerelease 4

20 Jul 16:56
Compare
Choose a tag to compare
Pre-release
  • A few bugfixes
  • Background code changes
  • CSharpMath.Text merged into CSharpMath.Rendering (not ready though)

0.1.0 SkiaSharp Update Prerelease 3

17 Jul 15:35
Compare
Choose a tag to compare
Pre-release

Introduced HighlightColor, removed BackgroundColor. Fixed a few bugs here and there, changed the internals of MathPainter quite a bit. Released upon request.

Discuss here

0.1.0 SkiaSharp Update Prerelease 2

13 Jul 09:51
Compare
Choose a tag to compare

0.1.0 SkiaSharp Update Prerelease 1

28 Jun 17:32
a998c57
Compare
Choose a tag to compare
Pre-release

The first prerelease for the 0.1.0 SkiaSharp Update, which brings a new SkiaSharp front end.
I don't have time to write a changelog right now, will include in prerelease 2.

Accompanying issue: #12

Initial port by @verybadcat

04 Jun 09:59
b3f1a21
Compare
Choose a tag to compare

CSharpMath

This is a C# port of the wonderful iosMath LaTeX engine.

It is now working in most cases. Some examples are below. Ironically enough, the first front end is iOS. However, if you want to add a front end, such as Xamarin.Forms or a Windows environment, it should be possible. You would have to define your own TypesettingContext and write an implementation of IGraphicsContext. The TypesettingContext in turn has several components, including choosing a font. Hopefully, you would not need to touch the core typesetting engine. (If you do, I would consider that a bug.)

Quadratic Formula

Power Series

Matrix Product

Continued Fraction

Usage

To get started, do something like this:

  var latexView = IosMathLabels.LatexView(@"x = -b \pm \frac{\sqrt{b^2-4ac}}{2a}", 15);
  latexView.ContentInsets = new UIEdgeInsets(10, 10, 10, 10);
  var size = latexView.SizeThatFits(new CoreGraphics.CGSize(370, 180));
  latexView.Frame = new CoreGraphics.CGRect(0, 20, size.Width, size.Height);
  someSuperview.Add(latexView);

Project needs

We need more front ends! As a sub-question, it would be interesting to know where iosMath got the data they use to create their mathTables. See issues.

License

The code is licensed by the MIT license. The latin-modern-math font is licensed by the GUST Font License.