Update supported typst version to 0.13
This commit is contained in:
parent
cde9954621
commit
9ea3b6167a
Binary file not shown.
@ -51,10 +51,10 @@
|
|||||||
translation-style: none,
|
translation-style: none,
|
||||||
item-spacing: 1em,
|
item-spacing: 1em,
|
||||||
) = {
|
) = {
|
||||||
assert(type(source) == "array", message: "source needs to be an array; perhaps you forgot to type `(` and `)`, or a trailing comma?")
|
assert(type(source) == array, message: "source needs to be an array; perhaps you forgot to type `(` and `)`, or a trailing comma?")
|
||||||
|
|
||||||
if morphemes != none {
|
if morphemes != none {
|
||||||
assert(type(morphemes) == "array", message: "morphemes needs to be an array; perhaps you forgot to type `(` and `)`, or a trailing comma?")
|
assert(type(morphemes) == array, message: "morphemes needs to be an array; perhaps you forgot to type `(` and `)`, or a trailing comma?")
|
||||||
assert(source.len() == morphemes.len(), message: "source and morphemes have different lengths")
|
assert(source.len() == morphemes.len(), message: "source and morphemes have different lengths")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,39 +161,38 @@
|
|||||||
none
|
none
|
||||||
}
|
}
|
||||||
|
|
||||||
style(styles => {
|
context(
|
||||||
block(breakable: breakable)[
|
block(breakable: breakable)[
|
||||||
#figure(
|
#figure(
|
||||||
kind: "example",
|
kind: "example",
|
||||||
numbering: it => [#example-count.display()],
|
numbering: it => [#example-count.display()],
|
||||||
outlined: false,
|
outlined: false,
|
||||||
supplement: label-supplement,
|
supplement: label-supplement,
|
||||||
stack(
|
stack(
|
||||||
dir: ltr, //TODO this needs to be more flexible
|
dir: ltr, //TODO this needs to be more flexible
|
||||||
left-padding,
|
left-padding,
|
||||||
[#example-number],
|
[#example-number],
|
||||||
gloss-padding - left-padding - measure([#example-number]).width,
|
gloss-padding - left-padding - measure([#example-number]).width,
|
||||||
{
|
{
|
||||||
if args.pos().len() == 1 { // a simple example with no sub-examples
|
if args.pos().len() == 1 { // a simple example with no sub-examples
|
||||||
gloss(..arguments(..args.pos().at(0)))
|
gloss(..arguments(..args.pos().at(0)))
|
||||||
}
|
}
|
||||||
else { // containing sub-examples
|
else { // containing sub-examples
|
||||||
let subexample-count = counter("subexample-count")
|
let subexample-count = counter("subexample-count")
|
||||||
subexample-count.update(0)
|
subexample-count.update(0)
|
||||||
set align(left)
|
set align(left)
|
||||||
if "header" in args.named() {
|
if "header" in args.named() {
|
||||||
par[#args.named().header]
|
par[#args.named().header]
|
||||||
}
|
}
|
||||||
for subexample in args.pos() {
|
for subexample in args.pos() {
|
||||||
subexample-count.step()
|
subexample-count.step()
|
||||||
add-subexample(subexample, subexample-count)
|
add-subexample(subexample, subexample-count)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
) #if label != none {std.label(label)}
|
) #if label != none {std.label(label)}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user