Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hansihe/texdroid
Android library for rendering and displaying TeX markup in UI.
https://github.com/hansihe/texdroid
Last synced: about 1 month ago
JSON representation
Android library for rendering and displaying TeX markup in UI.
- Host: GitHub
- URL: https://github.com/hansihe/texdroid
- Owner: hansihe
- Created: 2014-09-06T21:31:27.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-07T09:03:03.000Z (over 10 years ago)
- Last Synced: 2024-10-14T20:51:53.202Z (2 months ago)
- Language: JavaScript
- Size: 13.2 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
TexDroid
========Android library for rendering and displaying TeX markup in UI. It uses MathJax in a WebView running in a Service to render the TeX markup. Rendered markup is returned in the form of a fully self contained SVG file, in addition to the default pixel size of the equation. The data returned from the service can easily be passed into a TexEquationView to display, or used for other things.
The TexEquationView is backed by a WebView (javascript disabled for performance) with custom measuring code. When set to wrap\_content, the TexEquationView will automatically display the equation in a reasonable size. If the size is set manually, the equation will automatically scale to fill the availible space. By using the content\_scale attribute, you can multiply the equation size.
### Examples
test_layout.xml
```xml
```
```java
public class TexRenderTestActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.test_layout);
final TexEquationView equationView = (TexEquationView) findViewById(R.id.texView);
equationView.renderEquation(this, new TexEquation("x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}"));
}
}
```