Code Monkey home page Code Monkey logo

mathview's Introduction

Build Status

MathView

✔️ Support all types of math encoding ( MathML, TeX or AsciiMath etc) and chemical formulas.

✔️ Offline capability.

✔️ Lightweight (~150kb).

✔️ Fast rendering.

✔️ Easy to use.

✔️ Sample code MainActivity.java

Demo

Demo Url

Configured delimiters

  • TeX, inline mode: \(...\) or $...$
  • TeX, display mode: \[...\] or $$...$$
  • Asciimath: \`...\`

Installation

Add below lines to app's build.gradle

repositories {
  maven { url 'https://jitpack.io' }
}
dependencies {
  compile 'com.github.Nishant-Pathak:MathView:v1.1'
}

Usage

###In your layout:

    <com.nishant.math.MathView
        android:id="@+id/math_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

###In Activity:

  @BindView(R.id.math_view)
  MathView mathView;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    ...
    // update the view as below
    mathView.setText("`2+3 = 5`")
  }

###Proguard-rules:


-keepattributes EnclosingMethod
-keep class com.nishant.** { *; }

Sponsership

Thank you for your interest in the project. If you find it useful, please contribute here to keep the development on

Sponser

License

Copyright (C) 2016 - 2022 Nishant Pathak

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

mathview's People

Contributors

inzkhan avatar nishant-pathak avatar ranjan-agarwal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mathview's Issues

Text alignment left

Text alignment left is not working with either with xml or java set. Can you help me?

how to change textsize of formula

hey bro, your mathview is working very good but i am not able to chnage its font size... i somehow able to changed its color white "$$\\color{white}{"+tex+"}$$" through this code but i am not able to change its font size please help.. and also strings need total 4 back slashs

V1.1 Build fails

When I try to build my project, it fails and I get the message:

Could not find com.github.Nishant-Pathak:MathView:v1.1

Newline

\n is not working, what can i use instead of it?

Minimum SDK version

The minimum SDK version of the MathView currently is 17. Why is it so? I mean, would it work with 16? Any specific limitations.

By the way, very nice library. Thank you.

Not able to render MathML

We have a requirement of rendering all of our questions. The questions may be in ASCII Math or MathML.
We are able to render ASCII Math but it fails to render MathML and displays mathml as it is. Is there something we can do about this?

Failed to resolve dependency in M1 MacBook Pro

Hi Nishant,
Thanks for this awesome library.

I have used this in one of my project found it very useful. Earlier I was using MacBook Pro(intel chip) its wasn't giving any issue but on new MacBook Pro(M1) dependency is failed resolve. The same dependency version is working fine for Windows/Macbook with intel chips.

PFA for error I'm getting while running app.

Screenshot 2022-10-11 at 5 35 48 PM

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.