Package atessera.publ
package atessera.publ
Provides translators that convert structured publication descriptions
into target output formats.
This package sits between the document model layer
(atessera.json) and the template/compilation layers
(atessera.templ, atessera.comp). It takes a
PublicationContent object and
produces either LaTeX source (for subsequent PDF compilation) or HTML
output (for web viewing).
Key classes
TexTranslator- Main translator that converts a full publication into a compilable
LaTeX document. Delegates Markdown-to-LaTeX conversion to the
package-private
Markdownclass, bibliography extraction toBiblioExtractor, and final assembly toPublicationTemplate. HtmlTranslator- Translates a publication into a set of HTML chapter files with working cross-references, auto-numbered headings, and citation support. Uses a two-pass algorithm: the first pass collects all labels and reference targets, the second pass renders the content with resolved links.
BiblioExtractor- Utility that scans all Markdown sections of a publication and
extracts bibliography entries (represented as
BibItemnodes) into aMapkeyed by citation label.
Data flow
PublicationContent (atessera.json)
│
├──► TexTranslator ──► PublicationTemplate ──► LaTeX ──► PDF
│
└──► HtmlTranslator ──► HTML chapter files
Typical usage
// Prepare the engine factory with Velocity templates
EngineFactory factory = new EngineFactory(templates);
// Load publication content from JSON
PublicationContent content = PublicationContent.fromJson(jsonString);
// Generate LaTeX
TexTranslator tex = new TexTranslator(factory, content);
List<String> latexSource = tex.translate();
// Generate HTML
try (HtmlTranslator html = new HtmlTranslator(content)) {
html.translate();
}
-
ClassesClassDescriptionExtracts bibliography entries from the Markdown sections of a publication.Translates a
PublicationContentinto a set of HTML chapter files with resolved cross-references.Translates aPublicationContentinto a compilable LaTeX document.