-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.typ
More file actions
80 lines (49 loc) · 5.97 KB
/
Copy pathdocs.typ
File metadata and controls
80 lines (49 loc) · 5.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#import "template.typ": *
#import "@preview/tidy:0.4.3"
#import "churchslav.typ"
#let version = toml("typst.toml").package.version
#show "churchslav:0.0.0": "churchslav:" + version
#set heading(numbering: none)
#show: project.with(
title: "Churchslav",
subtitle: "Church Slavonic support for Typst.",
authors: (
"Aleksandr Andreev (Slavonic Computing Initiative)",
),
abstract: [
*churchslav* provides support for typesetting Church Slavonic and Znamenny Notation in #link("https://typst.app/", [Typst]).
],
date: datetime.today().display("[month repr:long] [day], [year]"),
version: version,
url: "https://github.com/slavonic/churchslav"
)
= Introduction
This package provides support for typesetting Church Slavonic and Znamenny Notation in #link("https://typst.app/", [Typst]).
Church Slavonic is the liturgical language of various Orthodox and Byzantine-Rite Catholic Churches. It uses a modified version of the Cyrillic alphabet. Znamenny Notation is a system of neumatic notation for East Slavic liturgical music.
== Numerals
The package provides a `cyrillic-numeral` function for displaying Cyrillic numerals. For example, `#cyrillic-numeral(215)` will display the number 215 as: #text(font: "Ponomar")[#churchslav.cyrillic-numeral(215)].
Additional parameters can be passed to the function to control the appearance of the titlo (see below).
== Znamenny Notation
The function `#neume` is used to typeset a syllable of text with a musical neume above it. It takes the neume as its first argument and the text as its second argument. This can be used to typeset Znamenny notation inline with text or to typeset relatively short passages, for example, the code:
`Here is a Podchashie: #neume[𜽰𜼅][Тво]`
will produce:
Here is a Podchashie: #text(font: "Ponomar")[#churchslav.neume[𜽰𜼅][Тво]]
Additional parameters can be passed to the function to control the appearance of the neume and the text (see below).
Note that entering an empty neume over a text will produce a horizontal line; `#neume[𜽐𜽂𜼰𜼅][]` results in:
#text(font: "Ponomar")[#churchslav.neume[𜽐𜽂𜼰𜼅][]].
The tilde character `~` can be used to create completely empty text or completely empty neumes, such as `#neume[𜽐𜽂𜼰𜼅][~] #neume[~][э]`, which produce:
#text(font: "Ponomar")[#churchslav.neume[𜽐𜽂𜼰𜼅][~]] and
#text(font: "Ponomar", fill: churchslav.kinovar)[#churchslav.neume[~][э]]
Neume functions can be nested, which can be used to typeset "explanatory marks", as in `#neume[#neume(font-size: 0.6em, gutter: -0.3em)[#text(fill: kinovar)[𜽗~]][𜽮]][ла]`, which produces:
#text(font: "Ponomar")[#churchslav.neume[#churchslav.neume(font-size: 0.6em, gutter: -0.3em)[#text(fill: churchslav.kinovar)[𜽗~]][𜽮]][ла]]
The function `#paraneume` is used to typeset a sequence of neumes above a string of text. It takes the neumes as its first argument and the text as its second argument. This can be used to typeset large chunks of Znamenny scores. Note that neumes are separated by spaces, while the text is divided into words, which are separated into syllables by hyphens, so `#paraneume[𜽰𜽂𜼅 𜽐𜼱𜼆 𜽐𜽂𜼰𜼅 𜽝𜽂𜼄 𜽐𜽂𜼰𜼅 𜽖𜽂𜼢 𜽗𜽂𜼢 𜽲𜼆 𜽯𜼅 𜽟 𜾆𜽂𜼰𜼅][Тво-ѧ по-бѣ-ди-тел-на-ѧ де-сни-ца]` produces:
#text(font: "Ponomar")[#churchslav.paraneume[𜽰𜽂𜼅 𜽐𜼱𜼆 𜽐𜽂𜼰𜼅 𜽝𜽂𜼄 𜽐𜽂𜼰𜼅 𜽖𜽂𜼢 𜽗𜽂𜼢 𜽲𜼆 𜽯𜼅 𜽟 𜾆𜽂𜼰𜼅][Тво-ѧ по-бѣ-ди-тел-на-ѧ де-сни-ца]]
Additional parameters can be passed to the function to control the appearance of the neumes and the text (see below).
To work with Znamenny Notation, install the Mezenets font on your system. This can be done by downloading the font from the #link("https://github.com/slavonic/mezenets", [Mezenets GitHub repository]). Since Typst supports COLR / CPAL fonts, the coloring of cinnabar marks is handled automatically.
Typst also supports advanced font features, such as Stylistic Sets, which can be used to turn on kerning rules that force adjoining neumes to make ligatures, as is customary in Kazan Notation used for Put / Demestvenny Chants. Thus, we have the example of `#paraneume(stylistic-set: 1)[𜽛𜼆𜼓 𜾆𜼈𜾩𜼢𜽐𜼶 𜽐𜽂𜼇 𜽝𜽂𜼢 𜽛𜽃𜼈𜼉 𜽖𜽃𜼈 𜽵𜼢𜼥 𜾆𜽂𜼱𜼇 𜽖𜽀𜼆 𜽛𜼆 𜽖𜽃𜼈 𜽔𜽀𜽀𜼉 𜽝𜽔𜼻𜼊 𜽝𜼤𜽐𜽃𜼈 𜽖𜽃𜽀𜼢 𜽛𜽃𜼈 𜽖𜽂𜼊 𜽵𜼢𜼥 𜽖𜼉 𜽖𜽀𜼢 𜽐𜽂𜼇 𜽖𜼉 𜽛𜽃𜼈𜼒 𜾆𜼱𜼊 𜾩𜼾𜼢𜽝𜼈𜽔𜼻𜼊 𜽝𜼤𜽐𜽃𜼈 𜽝𜽂𜼈 𜽛𜽃𜼈𜼉 𜽖𜽃𜼈 𜽵𜼢𜼥 𜾆𜼇𜾩𜽀𜼢 𜽔𜼆 𜽤𜼅𜼇 𜽚𜼢 𜾆𜽃𜼱𜼈 𜽝𜼻𜼆 𜾁𜼄][тво-рѧ-и а---нге-лы сво-ѧ дꙋ---хи и слꙋ-ги- сво-ѧ- ѡ----гнь па--лѧ--------щь.]`, producing:
#text(font: "Ponomar")[#churchslav.paraneume(stylistic-set: 1, padding: 0.5em)[𜽛𜼆𜼓 𜾆𜼈𜾩𜼢𜽐𜼶 𜽐𜽂𜼇 𜽝𜽂𜼢 𜽛𜽃𜼈𜼉 𜽖𜽃𜼈 𜽵𜼢𜼥 𜾆𜽂𜼱𜼇 𜽖𜽀𜼆 𜽛𜼆 𜽖𜽃𜼈 𜽔𜽀𜽀𜼉 𜽝𜽔𜼻𜼊 𜽝𜼤𜽐𜽃𜼈 𜽖𜽃𜽀𜼢 𜽛𜽃𜼈 𜽖𜽂𜼊 𜽵𜼢𜼥 𜽖𜼉 𜽖𜽀𜼢 𜽐𜽂𜼇 𜽖𜼉 𜽛𜽃𜼈𜼒 𜾆𜼱𜼊 𜾩𜼾𜼢𜽝𜼈𜽔𜼻𜼊 𜽝𜼤𜽐𜽃𜼈 𜽝𜽂𜼈 𜽛𜽃𜼈𜼉 𜽖𜽃𜼈 𜽵𜼢𜼥 𜾆𜼇𜾩𜽀𜼢 𜽔𜼆 𜽤𜼅𜼇 𜽚𜼢 𜾆𜽃𜼱𜼈 𜽝𜼻𜼆 𜾁𜼄][тво-рѧ-и а-а-а-нге-лы сво-ѧ дꙋ-ꙋ-ꙋ-хи и слꙋ-ги-и сво-ѧ-ѧ ѡ-ѡ-ѡ-ѡ-гнь па-а-лѧ-ѧ-ѧ-ѧ-ѧ-ѧ-ѧ-ѧ-щь.]]
// FIXME: neume alignment looks like crap
#pagebreak()
= Functions and Variables
#let docs = tidy.parse-module(read("churchslav.typ"), name: "churchslav", scope: (churchslav: churchslav), preamble: "#import churchslav: *\n#set text(font: \"Ponomar\")\n")
#tidy.show-module(docs, style: tidy.styles.default)