/SoxsotFormat

Creates an XML-FO string from a Shaleian dictionary data

Primary LanguageTypeScriptMIT LicenseMIT

Soxsot Format

Overview

Outputs an XSL-FO string for publication from a Shaleian dictionary data. You can generate a printable PDF file by typesetting the output XSL-FO string using AHFormatter. The PDF file generated using this package is available here.

シャレイア語辞典データから出版用の XSL-FO 文字列を出力します。 出力された XSL-FO 文字列を AHFormatter で組版することで、印刷して使える PDF ファイルを生成することができます。 このパッケージを利用して生成した PDF はこちらで公開しています。

Installation

Install via npm.

npm i soxsot-format

Usage

This package exports only one class: DictionaryFormatBuilder. Create an instance of this class and call the convert method.

import {DictionaryFormatBuilder} from "soxsot-format";
let builder = new DictionaryFormatBuilder("ja");  // specify the language
let documentString = builder.convert(dictionary);  // outputs an XSL-FO string