-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.qmd
More file actions
154 lines (123 loc) · 3.33 KB
/
example.qmd
File metadata and controls
154 lines (123 loc) · 3.33 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
---
title: "`interlinear` examples"
filters:
- interlinear
format:
html:
embed-resources: true
pdf:
keep-tex: true
# Add custom abbreviations here. You can overwrite Leipzig.js
# abbreviations.
gloss_abbreviations:
CONN: "connective"
EVID: "evidential"
---
The Quarto filter `interlinear` enables users to write numbered linguistic examples. The filter can also render interlinear glosses. A custom implementation for example numbering has been developed for the HTML output, while in LaTeX it is handled by expex. Interlinear glossing is handled by Leipzig.js in HTML and expex in LaTeX.
## Numbered examples
To create a numbered example, use a fenced Div block (`:::`) with class `ex`. For example the following code results in Example (1).
```
::: ex
You do the job. You are not the job.
:::
```
::: ex
You do the job. You are not the job.
:::
## Subexamples
You can create subexamples within an `ex` Div block with a fenced Div block with class `exi` (for "example item") for each subexample.
```
::: ex
::: exi
A bird sings a beautiful song.
:::
::: exi
A fish swims in the pool.
:::
:::
```
Which renders as:
::: ex
::: exi
A bird sings a beautiful song.
:::
::: exi
A fish swims in the pool.
:::
:::
## Interlinear glosses
To create an interlinear gloss, use a fenced Div block (`:::`) with class `gl` (usually, within an `ex` Div). These are the current rules:
- Each line of the interlinear gloss should start with `|`.
- Interlinear lines that start with `| -` are treated as preambles/original text (i.e. they are not aligned).
- The last interlinear line is treated as the free translation.
For example:
```
::: ex
::: gl
| - Gila aburun ferma hamišaluǧ güǧüna amuq’dač.
| gila abur-u-n ferma hamišaluǧ güǧüna amuq’-da-č.
| now they-OBL-GEN farm forever behind stay-FUT-NEG
| 'Now their farm will not stay behind forever.'
:::
:::
```
:::: {#ex-lez .ex}
::: gl
| - Gila aburun ferma hamišaluǧ güǧüna amuq’dač.
| gila abur-u-n ferma hamišaluǧ güǧüna amuq’-da-č.
| now they-OBL-GEN farm forever behind stay-FUT-NEG
| 'Now their farm will not stay behind forever.'
:::
::::
To create a gloss without free translation, add a final empty line starting with `| -` (the following example is also without the original text line):
```
::: ex
::: gl
| el perrito está comiendo
| the {little dog} is eating
| -
:::
:::
```
Renders as:
:::: {#ex-sp .ex}
::: gl
| el perrito está comiendo
| the {little dog} is eating
| -
:::
::::
You can include interlinear glosses in subexamples and mix glosses with simple sentences. Note that more than three colons `:` can be used for fenced Div blocks to show the different levels of embedding within the `ex` Div (this is entirely optional).
```
::::: ex
::: exi
Abandon all hope, ye who enter.
:::
::: exi
The Self, smaller than small, greater than great, is hidden in the heart of every creature.
:::
:::: exi
::: gl
| n=an apedani mehuni essandu
| CONN=him that.DAT.SG time.DAT.SG eat.they.shall
| 'They shall celebrate him on that date.'
:::
::::
:::::
```
Rendered as:
::::: ex
::: exi
Abandon all hope, ye who enter.
:::
::: exi
The Self, smaller than small, greater than great, is hidden in the heart of every creature.
:::
:::: exi
::: gl
| n=an apedani mehuni essandu
| CONN=him that.DAT.SG time.DAT.SG eat.they.shall
| 'They shall celebrate him on that date.'
:::
::::
:::::