Compare commits
No commits in common. "393603ae2d2e673ca95ebca0413a803f9cf71b30" and "3882f4e791f6b5a6e3088ca0a415e7695160fe3a" have entirely different histories.
393603ae2d
...
3882f4e791
@ -179,20 +179,6 @@ standard Typst counter functions to control gloss numbering:
|
||||
translation: [There always is in us a will for a great happiness.],
|
||||
)", addl-bindings: (gloss-count: gloss-count))
|
||||
|
||||
References to individual examples can be achieved using the `label` argument and the referencing mechanism of Typst:
|
||||
|
||||
#codeblock(
|
||||
"See @sorcerers:
|
||||
|
||||
#numbered-gloss(
|
||||
header: [Middle Welsh; modified from _Grammatical number in Welsh_ (1999) by Silva Nurmio (§~2.1.1)],
|
||||
source: ([ac], [ny], [allvs], [y], [dewinyon], [atteb], [idav]),
|
||||
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\",
|
||||
)
|
||||
|
||||
As we have seen in @sorcerers, […].", addl-bindings: (neg: neg, sg: sg, pl: pl))
|
||||
|
||||
== Styling lines of a gloss
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#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")
|
||||
@ -48,7 +47,6 @@
|
||||
additional-lines: (), //List of list of content
|
||||
translation: none,
|
||||
translation-style: none,
|
||||
label: none,
|
||||
|
||||
item-spacing: 1em,
|
||||
gloss-padding: 2.0em, //TODO document these
|
||||
@ -123,18 +121,13 @@
|
||||
|
||||
style(styles => {
|
||||
block(breakable: breakable)[
|
||||
#figure(
|
||||
kind: "lingexample",
|
||||
supplement: [Example],
|
||||
numbering: it => [#gloss-count.display()],
|
||||
stack(
|
||||
dir: ltr, //TODO this needs to be more flexible
|
||||
left_padding,
|
||||
[#gloss_number],
|
||||
gloss-padding - left_padding - measure([#gloss_number],styles).width,
|
||||
align(left)[#gloss_items],
|
||||
),
|
||||
) #if label != none {cmdlabel(label)}
|
||||
#stack(
|
||||
dir:ltr, //TODO this needs to be more flexible
|
||||
left_padding,
|
||||
[#gloss_number],
|
||||
gloss-padding - left_padding - measure([#gloss_number],styles).width,
|
||||
[#gloss_items]
|
||||
)
|
||||
]
|
||||
}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user