// Shared hand-written sample lesson exercising all 4 kinds. // Content field values are plain content blocks — exactly what the Rust driver // would hand us via `include`. #let info = ( title: "向量与几何 · 示例讲义", author: ("张老师", "李老师"), ) #let parts = ( // segment — with NESTED headings so per-level numbering is visible: // level-1 `=` should render `一、`, level-2 `==` should render `1.1` // (NOT the old buggy `二、一、`). ( kind: "segment", textbook: [ = 平面向量的数量积 本节研究平面向量的基本运算。设 $arrow(a)$、$arrow(b)$ 为平面内两个向量, 其数量积定义为 $arrow(a) dot arrow(b) = |arrow(a)| |arrow(b)| cos theta$, 其中 $theta$ 为两向量的夹角。 == 坐标表示 在直角坐标系下,若 $arrow(a) = (x_1, y_1)$、$arrow(b) = (x_2, y_2)$,则 $arrow(a) dot arrow(b) = x_1 x_2 + y_1 y_2$。 == 几何意义 数量积等于一个向量的模与另一向量在其方向上投影之积。 ], ), // example WITH source ( kind: "example", source: "2024 高考甲卷", problem: [ 已知 $arrow(a) = (1, 2)$,$arrow(b) = (3, -1)$,求 $arrow(a) dot arrow(b)$。 ], solution: [ 由坐标公式,$arrow(a) dot arrow(b) = 1 times 3 + 2 times (-1) = 3 - 2 = 1$。 ], ), // example WITHOUT source ( kind: "example", problem: [ 求向量 $arrow(a) = (3, 4)$ 的模长 $|arrow(a)|$。 ], solution: [ $|arrow(a)| = sqrt(3^2 + 4^2) = sqrt(25) = 5$。 ], ), // lemma WITH proof ( kind: "lemma", stmt: [ 对任意向量 $arrow(a)$、$arrow(b)$,有 $|arrow(a) dot arrow(b)| <= |arrow(a)| |arrow(b)|$。 ], proof: [ 由数量积定义 $arrow(a) dot arrow(b) = |arrow(a)| |arrow(b)| cos theta$, 又 $|cos theta| <= 1$,故 $|arrow(a) dot arrow(b)| = |arrow(a)| |arrow(b)| |cos theta| <= |arrow(a)| |arrow(b)|$。 $qed$ ], ), // lemma WITHOUT proof (proof key omitted entirely) ( kind: "lemma", stmt: [ 两个非零向量垂直当且仅当其数量积为零,即 $arrow(a) perp arrow(b) <==> arrow(a) dot arrow(b) = 0$。 ], ), // sop ( kind: "sop", sop: [ 求两向量夹角的标准步骤: + 计算数量积 $arrow(a) dot arrow(b)$; + 分别计算模长 $|arrow(a)|$、$|arrow(b)|$; + 代入 $cos theta = (arrow(a) dot arrow(b)) / (|arrow(a)| |arrow(b)|)$ 求出 $theta$。 ], ), )