Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/egormkn/latexview

🔢 JavaFX component that renders LaTeX text and math formulas
https://github.com/egormkn/latexview

formula fxml java javafx javafx-component javafx-components jlatexmath latex

Last synced: 3 months ago
JSON representation

🔢 JavaFX component that renders LaTeX text and math formulas

Awesome Lists containing this project

README

        

# LatexView

[![Build Status](https://travis-ci.com/egormkn/latexview.svg?branch=master)](https://travis-ci.com/egormkn/latexview) [![Maven Central](https://img.shields.io/maven-central/v/io.github.egormkn/latexview.svg)](https://search.maven.org/artifact/io.github.egormkn/latexview/) [![](https://img.shields.io/nexus/r/https/oss.sonatype.org/io.github.egormkn/latexview.svg)](https://oss.sonatype.org/content/repositories/releases/io/github/egormkn/latexview/) ![License](https://img.shields.io/github/license/egormkn/latexview.svg)

LatexView is a custom JavaFX component that renders LaTeX text and formulas using [JLatexMath](https://github.com/opencollab/jlatexmath) library.

![Demo App](src/test/resources/demo/demo.png)

Use [Demo](src/test/demo/Demo.java) application to test LaTeX rendering and syntax support.

See [JLatexMath](https://github.com/opencollab/jlatexmath) documentation for supported LaTeX features.

## Installation

### Maven dependency

```xml

io.github.egormkn
latexview
0.6.1

```

### Gradle dependency

```gradle
implementation 'io.github.egormkn:latexview:0.6.1'
```

### Other build systems

Installation details for other build systems can be found on [Central Repository](https://search.maven.org/artifact/io.github.egormkn/latexview/) page.

## Usage

### With FXML

See [ExampleFXML.java](src/test/java/ExampleFXML.java)

```fxml

\overset{\text{Lorenz system}}{
\begin{cases}
\frac { \partial \vec v }{\partial t} + \left( \vec v \nabla \right) \vec v = -\frac {\nabla p}{\rho} + \nu \nabla ^2 \vec v + \vec g \\
\frac { \partial \rho }{\partial t} + \nabla \cdot \left( \rho \vec v \right) = 0 \\
\frac { \partial T }{\partial t} + \nabla \cdot \left( T \vec v \right) = \chi \nabla ^2 T \\
\rho = \rho_0 \left( 1 - \gamma \left( T - T_0 \right) \right)
\end{cases}
}

```

### Without FXML

See [ExampleJFX.java](src/test/java/ExampleJFX.java)

```java
LatexView latex = new LatexView("\\LaTeX");
latex.setSize(30);

VBox vbox = new VBox(latex);
Scene scene = new Scene(vbox, 640, 480);
```

## License

This project is released under the GPLv3 license.
For more details, take a look at the [LICENSE](LICENSE) file.