Compare commits
No commits in common. "226dfe75f84c972807c0de0b25d39796002e9dbd" and "393603ae2d2e673ca95ebca0413a803f9cf71b30" have entirely different histories.
226dfe75f8
...
393603ae2d
@ -30,6 +30,3 @@ This library uses the MIT license; see `LICENSE.txt`.
|
||||
|
||||
Thanks to [Bethany E. Toma](https://github.com/betoma) for a number of
|
||||
suggestions and improvements.
|
||||
|
||||
Thanks to [Maja Abramski-Kronenberg](https://github.com/rwmpelstilzchen) for
|
||||
the labeling functionality.
|
||||
|
Binary file not shown.
@ -190,15 +190,10 @@ References to individual examples can be achieved using the `label` argument and
|
||||
morphemes: ([and], [#neg], [be_able.#smallcaps[pret].3#sg], [#smallcaps[def]], [sorcerer.#pl], [answer.#smallcaps[inf]], [to.3#sg.#smallcaps[m]]),
|
||||
translation: [and the sorcerers could not answer him],
|
||||
label: \"sorcerers\",
|
||||
label-supplement: [Example]
|
||||
)
|
||||
|
||||
As we have seen in @sorcerers, […].", addl-bindings: (neg: neg, sg: sg, pl: pl))
|
||||
|
||||
Labeling uses the Typst #link("https://typst.app/docs/reference/model/figure/")[figure] document element. The `label-supplement`
|
||||
parameter fills in the `suppliment` parameter of a `figure`, which is `[example]` by default.
|
||||
|
||||
|
||||
== Styling lines of a gloss
|
||||
|
||||
Each of the aforementioned text parameters has a corresponding style parameter,
|
||||
|
@ -1,6 +1,7 @@
|
||||
#import "abbreviations.typ"
|
||||
|
||||
#let gloss-count = counter("gloss_count")
|
||||
#let cmdlabel = label // a workround so we can use `label` as a variable name
|
||||
|
||||
#let build_gloss(item-spacing, formatters, gloss_line_lists) = {
|
||||
assert(gloss_line_lists.len() > 0, message: "Gloss line lists cannot be empty")
|
||||
@ -34,10 +35,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
// a workround so we can use `label` as a variable name where it is shadowed by the function param `label`
|
||||
// Once typst version 0.12 with https://github.com/typst/typst/pull/4038 is released we should be able
|
||||
// to replace this workaround with `std.label`
|
||||
#let cmdlabel = label
|
||||
|
||||
#let gloss(
|
||||
header: none,
|
||||
@ -52,7 +49,6 @@
|
||||
translation: none,
|
||||
translation-style: none,
|
||||
label: none,
|
||||
label-supplement: [example],
|
||||
|
||||
item-spacing: 1em,
|
||||
gloss-padding: 2.0em, //TODO document these
|
||||
@ -128,8 +124,8 @@
|
||||
style(styles => {
|
||||
block(breakable: breakable)[
|
||||
#figure(
|
||||
kind: "ling-example",
|
||||
supplement: label-supplement,
|
||||
kind: "lingexample",
|
||||
supplement: [Example],
|
||||
numbering: it => [#gloss-count.display()],
|
||||
stack(
|
||||
dir: ltr, //TODO this needs to be more flexible
|
||||
|
Loading…
Reference in New Issue
Block a user