Git Product home page Git Product logo

matheditor's Introduction

MathEditor

CI Status Version License Platform

MathEditor is a WYSIWYG editor for math formulas on iOS. It provides a UIView which edits math while it is being rendered. For rendering math it uses the iosMath library to get LaTeX style typesetting.

A math keyboard is included with the editor. However you can supply your own keyboard or use the system default keyboard as well. The math keyboard is optimized to easily enter certain components like fractions, exponents and square roots.

Example

There is a sample app included in this project that shows how to use the math editor as well as code for automatically resizing the editor as the text in it changes. To run the same app, clone the repository, and run pod install from the Example directory first. Then run the MathEditor_Example app.

Requirements

MathEditor works on iOS 8+ and requires ARC to build. It depends on the following Cocoapod:

Additionaly, it depends on the following Apple frameworks:

  • Foundation.framework
  • UIKit.framework

Installation

MathEditor is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "MathEditor"

Usage

The library provides a class MTEditableMathLabel which is a UIView that supports editing math equations. Simply add it to your storyboard or create it programmatically.

#import "MTEditableMathLabel.h"

MTEditableMathLabel* label = [[MTEditableMathLabel alloc] initWithFrame:...]
label.delegate = self;

Keyboard

To use the provided keyboard, set:

label.keyboard = [MTMathKeyboardRootView sharedInstance];

You can set any keyboard you want to use. A keyboard needs to be a UIView and implement the MTMathKeyboard interface.

To use the default system keyboard, set keyboard = nil. (This is the default.)

License

MathEditor is available under the MIT license. See the LICENSE file for more info.

matheditor's People

Contributors

kostub avatar maitbayev avatar

Watchers

James Cloos avatar Gao_Jipeng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.