Files
clean-sheets/examples/base.typ
T

104 lines
2.1 KiB
Typst

#import "@preview/clean-sheets:0.3.0": Cal, base-template, ex_box, qed
#show: body => base-template(
1,
[Linear Algebra I],
[Prof. Dr. Daniel Docent],
[Dr. Anne Assistant],
4,
([Jane Doe], [Joe Shmoe]),
[John Q. Public],
show-logo: false,
show-end-message: true,
body,
)
= Exercise 1
#ex_box(
heading: [#lorem(5)],
points: [$5 + 10 + 5$ Points],
)[
#lorem(30)
+ #lorem(10)
+ #lorem(15)
- #lorem(10)
- #lorem(12)
+ #lorem(8)
#lorem(40)
]
#lorem(59)#footnote[#lorem(21)]
$
(a + b)^n = sum_(k = 0)^n binom(n, k) space.thin a^(n - k) b^k
$
#lorem(30) #qed
= Exercise 2
#ex_box(points: [$25$ Points])[
#lorem(41)
#lorem(26)
]
#lorem(17) $-pi/2 < arctan(x) := integral_0^x (dif t) / (1 + t^2) < pi/2 space forall x in RR$. #lorem(24)
$
V(x_1, ..., x_n) := mat(
1, x_1, x_1^2, dots.c, x_1^(n-1);
1, x_2, x_2^2, dots.c, x_2^(n-1);
1, x_3, x_3^2, dots.c, x_3^(n-1);
dots.v, dots.v, dots.v, dots.down, dots.v;
1, x_n, x_n^2, dots.c, x_n^(n-1)
)
$
#lorem(20)
$
det V(x_1, ..., x_n) = product_(1 <= i < j <= n)(x_j - x_i)
$
#lorem(60)#footnote[#lorem(31)]#footnote[#lorem(13)] #qed
#lorem(30) #qed
= Exercise 3
#ex_box(heading: [#lorem(8)])[
#lorem(20)
#lorem(30)
]
```js
#!/usr/bin/env node
/* block comment */ // line comment
const π = 0xFF + 0b1010 + 0o755 + 1_000 + 1.2e-3, nil = null, nope = undefined;
let str = "double\n\"quote\"", s = 'single\'quote', tpl = `template ${π ?? 42} \`tick\``;
const re = /(?<=foo)[a-z\d_-]+?(?=bar)/giu;
const obj = { key: true, ["computed-"+π]: false, nested: { ...{x: 1} } };
const fn = async (x = 0) => x?.foo?.(π) ?? (() => { throw new Error("💥"); })();
class Ω extends Array { #private = 1; static get x() { return this?.name; } }
if (π >= 0 && π !== Infinity || !NaN) for (const [k,v] of Object.entries(obj)) console.log(k, v);
try { await Promise.resolve(fn?.({foo:n=>n**2})); } catch (e) { console.error(`${e}`); }
```
$
bold("B")(P) =
mu_0 / (4 pi)
integral
(I times bold(hat("r"))) / r^2 dif bold(l)
= (mu_0 I) / (4 pi)
integral
(dif bold(l) times bold(hat("r"))) / r^2
$
#lorem(30) #qed