Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 2.33 KB

README.md

File metadata and controls

71 lines (48 loc) · 2.33 KB

LatexView

Build Status Maven Central License

LatexView is a custom JavaFX component that renders LaTeX text and formulas using JLatexMath library.

Demo App

Use Demo application to test LaTeX rendering and syntax support.

See JLatexMath documentation for supported LaTeX features.

Installation

Maven dependency

<dependency>
  <groupId>io.github.egormkn</groupId>
  <artifactId>latexview</artifactId>
  <version>0.6.1</version>
</dependency>

Gradle dependency

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

Other build systems

Installation details for other build systems can be found on Central Repository page.

Usage

With FXML

See ExampleFXML.java

<LatexView formula="\\LaTeX" size="30"/>

<LatexView size="20">
    \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}
    }
</LatexView>

Without FXML

See ExampleJFX.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 file.