Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/judemanutd/KaTeXView
- Owner: judemanutd
- License: mit
- Created: 2019-03-14T17:43:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-16T07:42:40.000Z (almost 5 years ago)
- Last Synced: 2024-08-04T20:02:32.892Z (5 months ago)
- Topics: android, android-library, katex, kotlin, kotlin-android, tex, webview, webview-library
- Language: Kotlin
- Homepage:
- Size: 1.56 MB
- Stars: 55
- Watchers: 2
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Android-Awesome-Resources - KaTeXView
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_