Compare commits
1 Commits
b9074076d2
...
59c1373405
Author | SHA1 | Date | |
---|---|---|---|
59c1373405 |
@ -45,16 +45,6 @@
|
||||
show list: set block(spacing: 0.5em, below: 1em)
|
||||
set heading(numbering: (..nums) => nums.pos().at(0))
|
||||
|
||||
show ref: it => {
|
||||
import "object.typ": ref_obj
|
||||
|
||||
// Custom impl for object references
|
||||
let x = ref_obj(it)
|
||||
if (x != none) { return x }
|
||||
|
||||
// Use default `ref` implementation otherwise
|
||||
return it
|
||||
}
|
||||
|
||||
set list(
|
||||
tight: false,
|
||||
@ -70,6 +60,16 @@
|
||||
]
|
||||
}
|
||||
|
||||
show ref: it => {
|
||||
// Custom impl for object references
|
||||
let x = _ref_obj(it)
|
||||
if (x != none) { return x }
|
||||
|
||||
// Use default `ref` implementation otherwise
|
||||
return it
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Begin content
|
||||
//
|
||||
|
@ -40,6 +40,7 @@
|
||||
// This can be viewed directly with `#context query(<label>).first().value`,
|
||||
// Or referenced with `@label` (we define a custom renderer for this metadata later)
|
||||
if label_name != none {
|
||||
//let label_name = "obj:" + label_name
|
||||
let meta = (
|
||||
"obj_meta_ref_kind": kind,
|
||||
// "obj_content": obj_content,
|
||||
@ -50,9 +51,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
// `ref` implementation for object meta-references.
|
||||
// Returns `none` if `it` is not object metadata.
|
||||
#let ref_obj(it) = {
|
||||
// `ref` implementation for object meta-references,
|
||||
// see `show: ref`.
|
||||
#let _ref_obj(it) = {
|
||||
let magic_key = "obj_meta_ref_kind"
|
||||
if not (
|
||||
it.element != none
|
||||
@ -72,7 +73,7 @@
|
||||
|
||||
// Produces text like "Problem 2",
|
||||
// which takes you to the referenced object when clicked.
|
||||
return link(v.label, [#obj_type #obj_count])
|
||||
link(v.label, [#obj_type #obj_count])
|
||||
}
|
||||
|
||||
/// Factory function for objects.
|
||||
|
@ -153,7 +153,7 @@ What are the roots of the following polynomial?
|
||||
#v(1fr)
|
||||
#pagebreak() // MARK: page
|
||||
|
||||
#problem(label: "findci")
|
||||
#problem()
|
||||
If
|
||||
$
|
||||
f(x) = c_0 #tp c_1 x #tp c_2 x^2 #tp ... #tp c_n x^n
|
||||
@ -183,7 +183,7 @@ Find a formula for each $C_i$ in terms of $c_0, c_1, ..., c_n$.
|
||||
|
||||
|
||||
#problem()
|
||||
With the same setup as @findci, \
|
||||
With the same setup as the previous problem, \
|
||||
find formulas for the roots $r_1, r_2, ..., r_n$.
|
||||
|
||||
#solution([
|
||||
|
Loading…
x
Reference in New Issue
Block a user