Skip to content
greek conversion

ConversionOptions

Defined in: src/options.ts:555 (opens in a new tab)

Options shared by the conversion functions and converters.

The groups are named after what they describe: transliteration is the Latin writing system (how each letter and mark is spelled, written and read), greek the Greek one (shapes, accentuation, Unicode form; sigma and double rho reach Beta Code too, accentuation every format), betaCode the Beta Code conventions, text the transformations of the whole text in every format, and diacritics which classes of marks are kept at all. A name can appear in two groups because the questions differ: diacritics.coronis asks whether the coronis is kept, transliteration.coronis how it is written in Latin.

Every accepted value is ASCII; see CONVERSION_OPTION_VALUES.

optional betaCode?: BetaCodeOptions

Defined in: src/options.ts:563 (opens in a new tab)

Beta Code conventions.


optional diacritics?: DiacriticOptions

Defined in: src/options.ts:567 (opens in a new tab)

Which semantic diacritics are kept.


optional greek?: GreekOptions

Defined in: src/options.ts:561 (opens in a new tab)

The Greek writing system, and what reaches Beta Code.


optional preset?: Preset

Defined in: src/options.ts:557 (opens in a new tab)

Named configuration applied before custom fields.


optional source?: SourceOptions

Defined in: src/options.ts:598 (opens in a new tab)

How the input is written, when it is not written as the output: the input is read with these options, resolved on their own, and the output written with the others. source replaces the options for reading and does not merge with them: greek.accentuation and diacritics, which also change how transliteration is read, then only write the output. Without it, the options describe the input as well, which is how a text is normalized in its own style. Functions that only write, encode() among them, check it and ignore it. A restyle cannot restore what the source style does not note: the default style writes no coronis, so a text in that style has none to give.

Reading Greek and Beta Code depends on one option, greek.stigma, which reads a stigma between two letters as the ligature of σ and τ, in every format. Reading transliteration also depends on the transliteration group, greek.accentuation, and the smooth breathing class of diacritics, so that restyling a transliteration needs the style it is written in:

import { reencode } from "@humanities/greek-conversion";
reencode("tōn barbarōn", "transliteration", {
preset: "ala-lc-modern",
source: { preset: "sbl-general" },
});
// → tōn varvarōn

optional text?: TextOptions

Defined in: src/options.ts:565 (opens in a new tab)

Transformations of the whole text, in every format.


optional transliteration?: TransliterationOptions

Defined in: src/options.ts:559 (opens in a new tab)

The Latin writing system.