Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/judemanutd/KaTeXView

KaTeX View for android
https://github.com/judemanutd/KaTeXView

android android-library katex kotlin kotlin-android tex webview webview-library

Last synced: about 2 months ago
JSON representation

KaTeX View for android

Awesome Lists containing this project

README

        

# KaTeX View

[![Download](https://api.bintray.com/packages/jude-manutd/maven/katexview/images/download.svg) ](https://bintray.com/jude-manutd/maven/katexview/_latestVersion)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://opensource.org/licenses/MIT)
[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14)

A library that uses [Khan Academy KaTeX](https://github.com/KaTeX/KaTeX) for TeX math rendering.

## Usage

### Gradle

Add this to your module's build.gradle file:

```groovy

dependencies {
// ... other dependencies
implementation 'com.github.judemanutd:katexview:1.0.2'
}

```

### Maven

```xml

com.github.judemanutd
katexview
1.0.2
pom

```
__________

Include the following code in your xml layout

```xml

```

You can then supply the text to be rendered in kotlin or java

```kotlin

val text = "$$ c = \\pm\\sqrt{a^2 + b^2} $$"
katex_text.setText(text)

```

## Supported Attributes

All webview attributes are automatically inherited, in addition to that, the following can be customized
- `color`
- can be specified in xml using the `textColor` attribute
- can be used in code by calling the `setTextColor` on the `KatexView`
- `text size` - _coming soon_