Skip to content

About

In this project you find how to run javascript library "Katex" in java environment, using GraalVM.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

KaTeX Java Integration

This project demonstrates how to run JavaScript from Java using GraalVM. Specifically, it showcases the integration of the KaTeX JavaScript library within a Java project.

Requirements

  • Java 17 or higher: Ensure you have GraalVM JDK 17 or higher installed.
  • GraalVM: Download and install GraalVM from GraalVM's official website.
  • JavaScript Support: After installing GraalVM, run the following command to install JavaScript support:
    gu install js
    

Project Overview

The main goal of this project is to render LaTeX expressions using the KaTeX JavaScript library from within a Java application. This is achieved using GraalVM's polyglot capabilities.

Setup

  1. Clone the repository
  2. Install GraalVM and JavaScript support:
    gu install js
  3. Build the project using Maven:
    mvn clean install

Usage

To run the project, execute the Main class. This class initializes the KaTeX renderer and renders several LaTeX expressions to MathML.

mvn exec:java -Dexec.mainClass="de.Eugen.Main"

Output

The program will output the LaTeX expressions and their corresponding MathML representations.

License This project is licensed under the MIT License. See the LICENSE file for details.

About

In this project you find how to run javascript library "Katex" in java environment, using GraalVM.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages