Installation
texish is cross-published for the JVM, Scala Native, and Scala.js. There are two ways to use it: as the standalone command-line renderer, or as a library in an sbt build.
texish is cross-published for the JVM, Scala Native, and Scala.js. There are two ways to use it: as the standalone command-line renderer, or as a library in an sbt build.
As a library
Add texish with the %%% operator so sbt selects the right platform artifact:
libraryDependencies += "io.github.edadma" %%% "texish" % "0.3.0"
The library gives you the engine and the parser layer — construct a typesetter for your
target backend, feed it a source document, and flush it. On the JVM the backend is a
Graphics2D raster typesetter; on Scala Native it is the Cairo PDF and image backends.
As a command-line tool
The Scala Native build links a standalone texish executable that turns a source document
into a PDF (or one PNG per page) using the Cairo backend. Build it with:
sbt texishNative/nativeLink
The binary is produced at native/target/scala-3.8.4/texish. See the
command-line tool reference for its options.
Requirements
- Scala 3 for the library.
- For the native binary and PDF output, the system needs Cairo, FreeType, and libjpeg-turbo available to the linker (the Scala Native bindings link against them).