News for hackers. Stuff that matters.
Re:Pure Java Typesetting System by thangalin on Monday January 23, 2023 @06:22PM (#34496541)
> like font face, font size, horizontal and vertical element positioning and line spacing, etc.

May I recommend ConTeXt?

For my purposes, KeenType provides a real-time "rough draft" of equations rendered inside of KeenWrite[0], my FOSS Markdown editor. Rather than reinvent the typesetting wheel, I edit in Markdown, then KeenWrite converts the inline TeX-based equations for previewing using KeenType. When I'm ready to create a "finished" document, KeenWrite exports the Markdown to XHTML then feeds the XHTML, along with a theme, to ConTeXt[1]. The various themes[2] are where font faces sizes, alignment, kerning, line spacing, headers, footers, margins, etc. are tweaked.

In this way, content remains completely separated from presentation logic.

As a side note, KeenWrite 3 (and newer) automatically requests to install both ConTeXt and KeenWrite Themes when a user first exports a Markdown document as a PDF file.

[0]: https://github.com/DaveJarvis/keenwrite

[1]: https://wiki.contextgarden.net/Main_Page

[2]: https://github.com/DaveJarvis/keenwrite-themes

There are no comments on this comment yet.