explico 0.7.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1409 -1
- package/README.md +60 -15
- package/dist/compiler/astro.d.ts +6 -1
- package/dist/compiler/cli.d.ts +54 -3
- package/dist/compiler/cli.js +80 -6
- package/dist/compiler/collections.d.ts +35 -2
- package/dist/compiler/collections.js +84 -8
- package/dist/compiler/course-config.d.ts +3 -194
- package/dist/compiler/course-config.js +78 -5
- package/dist/compiler/exports/standalone-html.d.ts +6 -1
- package/dist/compiler/knowledge-version.js +1 -1
- package/dist/compiler/lesson-derivation.d.ts +27 -10
- package/dist/compiler/lesson-derivation.js +23 -8
- package/dist/compiler/logging.d.ts +14 -1
- package/dist/compiler/logging.js +6 -2
- package/dist/compiler/manifest.d.ts +204 -31
- package/dist/compiler/manifest.js +270 -55
- package/dist/compiler/resolution-report.d.ts +6 -1
- package/dist/course-config-Dsnri9Tk.d.ts +464 -0
- package/dist/reference/base-accents.d.mts +26 -0
- package/dist/reference/base-accents.mjs +31 -0
- package/dist/reference/base-roman-labels.d.mts +2 -2
- package/dist/reference/base-roman-labels.mjs +2 -2
- package/dist/reference/consistency.d.ts +14 -2
- package/dist/reference/consistency.js +108 -4
- package/dist/reference/delimiter-size.d.ts +21 -11
- package/dist/reference/delimiter-size.js +15 -39
- package/dist/reference/diagrams-validate.d.ts +7 -2
- package/dist/reference/diagrams-validate.js +9 -1
- package/dist/reference/equations-validate.d.ts +8 -5
- package/dist/reference/equations-validate.js +1 -0
- package/dist/reference/equations.d.mts +69 -34
- package/dist/reference/equations.mjs +90 -44
- package/dist/reference/examples-validate.d.ts +31 -0
- package/dist/reference/examples-validate.js +48 -0
- package/dist/reference/figures-validate.d.ts +1 -1
- package/dist/reference/figures-validate.js +4 -1
- package/dist/reference/folds-validate.d.ts +33 -0
- package/dist/reference/folds-validate.js +32 -0
- package/dist/reference/gate-abbreviations.d.ts +3 -1
- package/dist/reference/gate-abbreviations.js +3 -2
- package/dist/reference/gate-course-rules.d.ts +32 -0
- package/dist/reference/gate-course-rules.js +85 -0
- package/dist/reference/gate-heading-length.d.ts +5 -2
- package/dist/reference/gate-heading-length.js +47 -23
- package/dist/reference/gate-heading-structure.d.ts +41 -0
- package/dist/reference/gate-heading-structure.js +113 -0
- package/dist/reference/gate-math-punctuation.d.ts +71 -0
- package/dist/reference/gate-math-punctuation.js +251 -0
- package/dist/reference/gate-math.d.ts +44 -6
- package/dist/reference/gate-math.js +63 -10
- package/dist/reference/gate-part-pages.d.ts +50 -0
- package/dist/reference/gate-part-pages.js +118 -0
- package/dist/reference/gate-prose-notation.d.ts +32 -11
- package/dist/reference/gate-prose-notation.js +30 -8
- package/dist/reference/katex-delimiters.d.mts +15 -0
- package/dist/reference/katex-delimiters.mjs +138 -0
- package/dist/reference/katex-options.mjs +4 -0
- package/dist/reference/keyed-float-validate.d.ts +27 -10
- package/dist/reference/keyed-float-validate.js +15 -1
- package/dist/reference/keyed-jsx-floats.d.mts +11 -5
- package/dist/reference/keyed-jsx-floats.mjs +73 -20
- package/dist/reference/knowledge-checks-validate.d.ts +1 -1
- package/dist/reference/knowledge-checks.d.mts +3 -1
- package/dist/reference/knowledge-checks.mjs +9 -4
- package/dist/reference/lab-math-scope.d.ts +1 -0
- package/dist/reference/lab-math-slot.d.ts +34 -0
- package/dist/reference/lab-math-slot.js +6 -0
- package/dist/reference/math-glyphs.d.mts +80 -4
- package/dist/reference/math-glyphs.mjs +588 -39
- package/dist/reference/page-notation.d.ts +6 -1
- package/dist/reference/raw-floats-validate.js +1 -1
- package/dist/reference/raw-floats.mjs +1 -1
- package/dist/reference/rehype-heading-anchors.d.mts +14 -0
- package/dist/reference/rehype-heading-anchors.mjs +116 -17
- package/dist/reference/rehype-table-header-labels.d.mts +6 -1
- package/dist/reference/rehype-table-header-labels.mjs +21 -3
- package/dist/reference/remark-asides.d.mts +3 -0
- package/dist/reference/remark-asides.mjs +180 -0
- package/dist/reference/remark-memo.d.mts +3 -1
- package/dist/reference/remark-memo.mjs +42 -11
- package/dist/reference/remark-notation.d.mts +60 -10
- package/dist/reference/remark-notation.mjs +387 -36
- package/dist/reference/render-lab-math.d.ts +4 -26
- package/dist/reference/render-lab-math.js +5 -5
- package/dist/reference/sections-validate.d.ts +27 -0
- package/dist/reference/sections-validate.js +41 -0
- package/dist/reference/sections.d.mts +97 -0
- package/dist/reference/sections.mjs +306 -0
- package/dist/reference/tables-validate.d.ts +1 -1
- package/dist/reference/types.d.ts +24 -1
- package/dist/reference/unit-words.d.ts +37 -0
- package/dist/reference/unit-words.js +170 -0
- package/dist/rules/catalog.d.ts +176 -0
- package/dist/rules/catalog.js +983 -0
- package/dist/rules/course-rules.d.ts +115 -0
- package/dist/rules/course-rules.js +292 -0
- package/dist/rules/course-rules.schema.json +138 -0
- package/dist/rules/in-effect.d.ts +53 -0
- package/dist/rules/in-effect.js +142 -0
- package/dist/rules/rules.schema.json +1072 -0
- package/dist/rules/settings.d.ts +3 -0
- package/dist/rules/settings.js +290 -0
- package/dist/rules/waivers.d.ts +53 -0
- package/dist/rules/waivers.js +132 -0
- package/dist/session/PreferenceStore.d.ts +5 -0
- package/dist/session/PreferenceStore.js +9 -0
- package/docs/VERSIONING.md +2 -2
- package/docs/authoring/README.md +232 -40
- package/docs/authoring/agents.md +55 -9
- package/docs/authoring/components.md +178 -22
- package/docs/authoring/migrating.md +1324 -2
- package/docs/authoring/notation.md +616 -344
- package/docs/authoring/prose.md +551 -0
- package/docs/authoring/retired.md +35 -0
- package/docs/authoring/structure-rules.md +422 -40
- package/docs/authoring/structure.md +445 -62
- package/docs/authoring/versioning.md +20 -28
- package/docs/authoring/visualizations.md +142 -20
- package/docs/katex-bracket-scaling.md +191 -0
- package/package.json +3 -2
- package/src/compiler/cli.ts +139 -6
- package/src/compiler/collections.ts +144 -10
- package/src/compiler/course-config.ts +273 -34
- package/src/compiler/knowledge-version.ts +1 -1
- package/src/compiler/lesson-derivation.ts +54 -15
- package/src/compiler/logging.ts +21 -4
- package/src/compiler/manifest.ts +573 -104
- package/src/components/BlockHeading.astro +113 -0
- package/src/components/CourseContents.astro +221 -0
- package/src/components/CurriculumMap.astro +5 -6
- package/src/components/FloatIndex.astro +200 -0
- package/src/components/HoverPanel.astro +431 -79
- package/src/components/PartBridge.astro +27 -0
- package/src/components/PartOverview.astro +401 -0
- package/src/components/PartScope.astro +27 -0
- package/src/components/abbreviation/AbbreviationLayer.astro +49 -51
- package/src/components/assessments/AssessmentRunner.tsx +8 -5
- package/src/components/assessments/AssessmentSet.astro +23 -26
- package/src/components/block-heading.ts +146 -0
- package/src/components/card-arrow.ts +243 -0
- package/src/components/card-drag.ts +631 -0
- package/src/components/card-jump.ts +45 -0
- package/src/components/card-manager.ts +1589 -0
- package/src/components/card-memory.ts +177 -0
- package/src/components/card-placement.ts +504 -0
- package/src/components/card-side.ts +336 -0
- package/src/components/card-travel.ts +197 -0
- package/src/components/citation/CitationLayer.astro +77 -76
- package/src/components/diagram/Diagram.astro +161 -316
- package/src/components/disclosure/course-disclosure.ts +24 -0
- package/src/components/disclosure/hover-preview.ts +122 -42
- package/src/components/disclosure/persisted-disclosure.ts +3 -3
- package/src/components/disclosure/print-as-shown.ts +252 -0
- package/src/components/examples/CompactExample.astro +3 -1
- package/src/components/examples/CompactExamples.astro +101 -94
- package/src/components/figure/Figure.astro +174 -274
- package/src/components/figure/FloatCaption.astro +87 -0
- package/src/components/figure/figure-state.ts +58 -0
- package/src/components/figure/figure-tools.ts +87 -0
- package/src/components/float-name.ts +101 -0
- package/src/components/fold/Fold.astro +125 -0
- package/src/components/fold/fold-id.ts +40 -0
- package/src/components/memo/Memo.astro +162 -231
- package/src/components/memo/ShortNote.astro +6 -6
- package/src/components/notation/NotationFormula.astro +5 -1
- package/src/components/notation/NotationGlossary.astro +24 -14
- package/src/components/notation/NotationLayer.astro +169 -162
- package/src/components/notation/NotationMath.astro +10 -1
- package/src/components/notation/render-notation-math.ts +111 -10
- package/src/components/reference/FloatRefLayer.astro +485 -423
- package/src/components/starlight/AboutPanel.astro +22 -6
- package/src/components/starlight/CollapsibleSections.astro +207 -93
- package/src/components/starlight/DiagramEnhancer.astro +15 -138
- package/src/components/starlight/HeadingAnchorEnhancer.astro +193 -1
- package/src/components/starlight/KeyedFloatEnhancer.astro +100 -9
- package/src/components/starlight/LayoutHeader.astro +298 -19
- package/src/components/starlight/LayoutPageSidebar.astro +99 -12
- package/src/components/starlight/LayoutPageTitle.astro +120 -0
- package/src/components/starlight/LayoutSidebar.astro +229 -11
- package/src/components/starlight/LessonExportActions.astro +53 -72
- package/src/components/starlight/LessonFooter.astro +26 -4
- package/src/components/starlight/section-parts.ts +15 -2
- package/src/components/starlight/section-summary.ts +181 -0
- package/src/components/table/Table.astro +95 -76
- package/src/components/table/TableOverflowExpander.astro +65 -28
- package/src/content-config.ts +40 -4
- package/src/reference/base-accents.mjs +31 -0
- package/src/reference/base-roman-labels.mjs +2 -2
- package/src/reference/consistency.ts +176 -5
- package/src/reference/delimiter-size.ts +40 -61
- package/src/reference/diagrams-validate.ts +17 -1
- package/src/reference/equations-validate.ts +10 -5
- package/src/reference/equations.mjs +90 -44
- package/src/reference/examples-validate.ts +97 -0
- package/src/reference/figures-validate.ts +6 -1
- package/src/reference/folds-validate.ts +65 -0
- package/src/reference/gate-abbreviations.ts +3 -2
- package/src/reference/gate-course-rules.ts +134 -0
- package/src/reference/gate-heading-length.ts +68 -37
- package/src/reference/gate-heading-structure.ts +193 -0
- package/src/reference/gate-math-punctuation.ts +381 -0
- package/src/reference/gate-math.ts +119 -12
- package/src/reference/gate-part-pages.ts +217 -0
- package/src/reference/gate-prose-notation.ts +74 -13
- package/src/reference/katex-delimiters.mjs +138 -0
- package/src/reference/katex-options.mjs +4 -0
- package/src/reference/keyed-float-validate.ts +45 -11
- package/src/reference/keyed-jsx-floats.mjs +73 -20
- package/src/reference/knowledge-checks-validate.ts +1 -1
- package/src/reference/knowledge-checks.mjs +9 -4
- package/src/reference/lab-math-slot.ts +36 -0
- package/src/reference/math-glyphs.mjs +588 -39
- package/src/reference/raw-floats-validate.ts +1 -1
- package/src/reference/raw-floats.mjs +1 -1
- package/src/reference/rehype-heading-anchors.mjs +116 -17
- package/src/reference/rehype-table-header-labels.mjs +21 -3
- package/src/reference/remark-asides.mjs +180 -0
- package/src/reference/remark-memo.mjs +42 -11
- package/src/reference/remark-notation.mjs +387 -36
- package/src/reference/render-lab-math.ts +17 -32
- package/src/reference/sections-validate.ts +81 -0
- package/src/reference/sections.mjs +306 -0
- package/src/reference/tables-validate.ts +2 -1
- package/src/reference/types.ts +24 -0
- package/src/reference/unit-words.ts +233 -0
- package/src/rules/catalog.ts +1298 -0
- package/src/rules/course-rules.ts +456 -0
- package/src/rules/in-effect.ts +235 -0
- package/src/rules/settings.ts +448 -0
- package/src/rules/waivers.ts +249 -0
- package/src/session/PreferenceStore.ts +15 -0
- package/src/styles/global.css +1471 -163
- package/src/styles/surfaces.css +182 -0
- package/src/components/hover-panel.ts +0 -339
- package/src/components/popup-stack.ts +0 -345
|
@@ -65,7 +65,7 @@ still applies is N9/N14 against the *visible* text, as above.
|
|
|
65
65
|
| Component | Import | What it's for | Doc |
|
|
66
66
|
| --- | --- | --- | --- |
|
|
67
67
|
| `<ShortNote id="…" title="…" description="…">` | `explico/components/memo/ShortNote.astro` | An inline, click-to-expand aside that replaces its own trigger text in place — "the smaller, genuinely inline interaction." No number, no cross-page reference. | [structure.md](structure.md#detailed-memos-and-inline-short-notes) |
|
|
68
|
-
| `<Memo id="…"
|
|
68
|
+
| `<Memo id="…" caption="…" short="…">` | `explico/components/memo/Memo.astro` | A collapsible, lettered side-note for optional depth (derivation, proof, edge case) that would otherwise bloat the main argument. Cited with `[[memo-id]]`, which prints its superscript letter. | [structure.md](structure.md#detailed-memos-and-inline-short-notes) |
|
|
69
69
|
|
|
70
70
|
Both differ from a bare `title` tooltip in the same way: they hold real,
|
|
71
71
|
possibly multi-paragraph Markdown content (including equations, tables,
|
|
@@ -73,35 +73,141 @@ figures), are addressable (`id`, a permalink), and are meant to be found
|
|
|
73
73
|
again — a `title` tooltip is disposable and invisible outside a hover/focus
|
|
74
74
|
event.
|
|
75
75
|
|
|
76
|
+
### Folding content away: `<Fold>`
|
|
77
|
+
|
|
78
|
+
| Component | Import | What it's for | Doc |
|
|
79
|
+
| --- | --- | --- | --- |
|
|
80
|
+
| `<Fold label="…" defaultOpen rememberState>` | `explico/components/fold/Fold.astro` | Lets a reader fold away a stretch of the lesson — most often one figure, diagram or table — where it stands. No heading, number or marker. | [structure.md](structure.md#collapsing-two-mechanisms) |
|
|
81
|
+
|
|
82
|
+
```mdx
|
|
83
|
+
<Fold>
|
|
84
|
+
<Diagram id="launch-angle-dependency" … />
|
|
85
|
+
</Fold>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
A fold has a bar with the section chevron and, while folded, the "Hidden
|
|
89
|
+
here: 1 diagram" line; the reader's choice is remembered per page, a deep
|
|
90
|
+
link or find-in-page opens it, and it prints as shown. The bar, set at the
|
|
91
|
+
size of the text it folds, is the `label`; without one it names the numbered
|
|
92
|
+
floats inside by number and short caption — "Diagram 2.2.1 Inputs to the
|
|
93
|
+
launch-angle search" — and is then their name: their caption lines drop the
|
|
94
|
+
bold short-caption title that would repeat it. A fold with neither fails the
|
|
95
|
+
build (`fold-unnamed`). It starts folded unless
|
|
96
|
+
`defaultOpen`, or the course's `disclosure.folds`, says otherwise.
|
|
97
|
+
|
|
98
|
+
A float never folds by itself — a figure or a diagram is always its picture
|
|
99
|
+
and its caption line — so a fold is how one becomes collapsible outside a
|
|
100
|
+
collapsible section. Choose it over a `<Memo>` when the content belongs where
|
|
101
|
+
it stands and needs no other name: a fold is not an aside (no frame, no
|
|
102
|
+
tint: the plain tier, like the float it holds), puts no letter in the text,
|
|
103
|
+
has no `[[…]]` key, is not in "On this page" and takes no outline number.
|
|
104
|
+
The floats inside keep their numbers and their `[[…]]` references; a
|
|
105
|
+
reference to one previews it in a card and marks the fold's bar.
|
|
106
|
+
|
|
76
107
|
## Numbered floats
|
|
77
108
|
|
|
78
|
-
Each of these gets a `‹part›.‹n›` number (its own counter,
|
|
79
|
-
others — see [structure.md § Numbering](structure.md#numbering)),
|
|
80
|
-
`#anchor`, and same-page/cross-page reference
|
|
81
|
-
`[[lesson/slug#prefix-id]]`.
|
|
109
|
+
Each of these gets a `‹part›.‹chapter›.‹n›` number (its own counter,
|
|
110
|
+
independent of the others — see [structure.md § Numbering](structure.md#numbering)),
|
|
111
|
+
a stable `#anchor` named after its `id`, and same-page/cross-page reference
|
|
112
|
+
syntax `[[prefix-id]]` / `[[lesson/slug#prefix-id]]`. A section is citable the
|
|
113
|
+
same way, by its heading's anchor: `[[sec-two-ways-to-name-the-same-point]]`
|
|
114
|
+
prints `§ 1.1.2` ([structure.md § Section numbers](structure.md#section-numbers)).
|
|
82
115
|
|
|
83
116
|
| Component | Import | Prefix | Doc |
|
|
84
117
|
| --- | --- | --- | --- |
|
|
85
|
-
| `<Table id="…" caption="…">` | `explico/components/table/Table.astro` | `tab-` | [structure.md](structure.md#numbering), [V rules](visualizations.md) |
|
|
86
|
-
| `<Figure id="…"
|
|
87
|
-
| `<Diagram id="…"
|
|
88
|
-
| A display equation with `\label{eq:key}` | `remark-math` (built in) | `eq-` | [N5](notation.md#n5), [structure.md](structure.md#numbering) |
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
118
|
+
| `<Table id="…" caption="…" short="…">` | `explico/components/table/Table.astro` | `tab-` | [structure.md](structure.md#numbering), [V rules](visualizations.md) |
|
|
119
|
+
| `<Figure id="…" caption="…" short="…" previewable defaultOpen rememberState>`, with an optional `slot="tools"` | `explico/components/figure/Figure.astro` | `fig-` | [structure.md](structure.md#numbering), [V2](visualizations.md#v2)/[V3](visualizations.md#v3) |
|
|
120
|
+
| `<Diagram id="…" caption="…" short="…" nodes={…} edges={…}>` | `explico/components/diagram/Diagram.astro` | `dia-` | [V1](visualizations.md#v1) |
|
|
121
|
+
| A display equation with `\label{eq:key}` and `\caption{…}` | `remark-math` (built in) | `eq-` | [N5](notation.md#n5), [structure.md](structure.md#numbering) |
|
|
122
|
+
|
|
123
|
+
### The caption pair
|
|
124
|
+
|
|
125
|
+
Every float is named the same way, LaTeX's `\caption[short]{long}`: a long
|
|
126
|
+
**`caption`** and an optional **`short`** caption. Nothing else names a float
|
|
127
|
+
— no `title`, no `label`, no `summary` — and a figure or a diagram has no
|
|
128
|
+
title bar: its number sits in its caption line.
|
|
129
|
+
|
|
130
|
+
| Float | Long caption — where it shows | Short caption — where it shows |
|
|
131
|
+
| --- | --- | --- |
|
|
132
|
+
| `<Figure>` | `caption`: below the figure, after `Figure 2.2.1` and its chain icon | `short`: opens the caption line as its bold title, and heads the `[[fig-…]]` preview card |
|
|
133
|
+
| `<Diagram>` | `caption`: below the graph, the same caption line as a figure; its right end holds a widen button ↔ while the graph is wider than the column | `short`: opens the caption line as its bold title, and heads the `[[dia-…]]` preview card |
|
|
134
|
+
| `<Table>` | `caption`: above the table (the LaTeX table convention), after `Table 2.2.1`; its right end holds the fold button (and a widen button ↔ when the table is wider than the column); stays with the header row when the table is folded | `short`: opens the caption line as its bold title, and heads the `[[tab-…]]` preview card |
|
|
135
|
+
| Display equation | none — an equation takes a short caption only | `\caption{…}` inside the `$$…$$`, stripped before KaTeX like `\label{}`: heads the `[[eq-…]]` preview card and names the copy action ("Copy LaTeX — Range formula") |
|
|
136
|
+
| `<Memo>` | `caption` (required): the memo's bar, and the head of its marker's preview | `short`: the marker's tooltip |
|
|
137
|
+
| `<CompactExamples>` | none | `short` (required, with `id`): the set's topic — its heading, after the engine's "Example" badge and number |
|
|
138
|
+
|
|
139
|
+
`caption` is required wherever it exists; `short` is optional everywhere but
|
|
140
|
+
on a `<CompactExamples>`, whose heading it is, and is what
|
|
141
|
+
[rule S1](structure-rules.md#s1) measures — the long caption is never capped.
|
|
142
|
+
|
|
143
|
+
A figure's, a table's or a diagram's `short` is its name wherever the page
|
|
144
|
+
names it (docs/plans/figures-and-short-captions.md, decision 9): the bold
|
|
145
|
+
title that opens its caption line — "**Sampled flight data.** Position, …",
|
|
146
|
+
with a period added unless it ends in punctuation of its own — a folded
|
|
147
|
+
section's "Hidden here: **Figure 2.1.1** Projectile trajectory explorer, 2
|
|
148
|
+
paragraphs", a `<Fold>`'s bar, and a copied link, which says "Link copied ·
|
|
149
|
+
Figure 2.1.1 · Projectile trajectory explorer" and pastes into a document as
|
|
150
|
+
a link reading "Figure 2.1.1, Projectile trajectory explorer". A float
|
|
151
|
+
without one is named by its number alone, and counted, not named, in a
|
|
152
|
+
folded section's line. So give each figure, table and diagram a `short`
|
|
153
|
+
that names it, and write the long caption to go on from that name instead
|
|
154
|
+
of restating it ([rule S9](structure-rules.md#s9)). A memo's or an
|
|
155
|
+
equation's `short` stays optional: its caption already names it where it
|
|
156
|
+
is shown.
|
|
157
|
+
|
|
158
|
+
- **A figure or a diagram never hides by itself.** It is laid out as LaTeX
|
|
159
|
+
lays a figure out, in every state: its picture, then its caption line —
|
|
160
|
+
number, chain icon, caption. To let a reader fold one away, wrap it in a
|
|
161
|
+
[`<Fold>`](#folding-content-away-fold) or put it in a collapsible (or
|
|
162
|
+
`[card]`) section ([structure.md § Collapsing](structure.md#collapsing-two-mechanisms)).
|
|
163
|
+
- **A lab's tools follow the caption, and only they fold.** A `<Figure>`'s
|
|
164
|
+
default slot is its picture; a `tools` slot (`<Fragment slot="tools">…`,
|
|
165
|
+
or an island with `slot="tools"`) renders after the caption line in a tray
|
|
166
|
+
of its own. The fold button ⌃ / ⌄ ends the caption line; folded, the tools
|
|
167
|
+
leave a "Hidden here: 2 sliders, 1 equation" line that unfolds them. On a
|
|
168
|
+
`<Figure>`, `defaultOpen` (default: the course's `disclosure.figures`) and
|
|
169
|
+
`rememberState` (default `true`) are about the tools; a figure without
|
|
170
|
+
them has no button and no tray, and a `<Diagram>` has neither prop. The
|
|
171
|
+
caption line ends with a live clause a lab writes with `setFigureState`
|
|
172
|
+
([visualizations.md § V3](visualizations.md#v3)).
|
|
173
|
+
- **A lab has no title or caption of its own.** The `<Figure>` around it
|
|
174
|
+
names the whole ([visualizations.md § Labs](visualizations.md#v3)).
|
|
99
175
|
- **A raw Markdown pipe table or a raw `<table>`, or a `<Diagram>` with no
|
|
100
176
|
`id`,** renders fine but never enters keyed-float validation — no number,
|
|
101
177
|
no `[[…]]` target. Wrap it (`<Table>`/`<Figure>`) or give the diagram an
|
|
102
178
|
`id` if it needs to be referenced. See [structure.md § Raw and unwrapped
|
|
103
179
|
floats](structure.md#raw-and-unwrapped-floats).
|
|
104
180
|
|
|
181
|
+
_Enforcement._ A `<Figure title>`, a `<Diagram label>` (or `title`,
|
|
182
|
+
`defaultOpen`, `rememberState`), a `<Memo title>` / `description` and a
|
|
183
|
+
`<CompactExamples summary>` fail the build with the edit to make: `fig-removed-prop` / `dia-removed-prop` /
|
|
184
|
+
`ex-removed-prop` in `pnpm validate:content` (the keyed-floats invariant),
|
|
185
|
+
and the component itself when it renders. A `<CompactExamples>` with no `id`
|
|
186
|
+
or no `short` fails the same way (`ex-missing-prop`). An equation's `\caption{}` that is inline, repeated
|
|
187
|
+
or empty fails the page build.
|
|
188
|
+
|
|
189
|
+
### The "Figures and tables" page
|
|
190
|
+
|
|
191
|
+
`explico/components/FloatIndex.astro` lists every numbered figure, table and
|
|
192
|
+
diagram that has an `id` — LaTeX's `\listoffigures` and `\listoftables` in
|
|
193
|
+
one — by part and chapter, each entry its number linked to the float and its
|
|
194
|
+
short caption; a float without one is listed by its long caption, muted, or
|
|
195
|
+
by its number alone when its captions live in a wrapper component. Put it on
|
|
196
|
+
a top-level page named `figures-and-tables.mdx`, and the sidebar's Reference
|
|
197
|
+
group lists the page beside the curriculum map and the glossary:
|
|
198
|
+
|
|
199
|
+
```mdx
|
|
200
|
+
---
|
|
201
|
+
title: Figures and tables
|
|
202
|
+
description: Every numbered figure, table and diagram of the course.
|
|
203
|
+
editorialStatus: draft
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
import FloatIndex from 'explico/components/FloatIndex.astro';
|
|
207
|
+
|
|
208
|
+
<FloatIndex />
|
|
209
|
+
```
|
|
210
|
+
|
|
105
211
|
## Reference systems
|
|
106
212
|
|
|
107
213
|
These bind a term to a definition that a reader can hover *and* look up
|
|
@@ -111,15 +217,59 @@ elsewhere — the machinery a bare `title` tooltip deliberately skips.
|
|
|
111
217
|
| --- | --- | --- | --- |
|
|
112
218
|
| `[[key]]` in prose, before first math use | `content/notation/*.md` entry | One-meaning-per-glyph hover card everywhere `$key$`-bound math appears on the page | [N4](notation.md#n4) |
|
|
113
219
|
| `\explain{key}{latex}` inside `$…$` | Same notation entry | Escape hatch for a compound/colliding symbol only, not the default bind | [N4](notation.md#n4) |
|
|
114
|
-
| A bare all-caps/dotted term (`OLS`, `w.r.t.`) in prose | `content/abbreviations/*.md`, or `course.
|
|
220
|
+
| A bare all-caps/dotted term (`OLS`, `w.r.t.`) in prose | `content/abbreviations/*.md`, or `course.settings.json` `rules.N14.allow` | Hover/click card on first occurrence, linked to the glossary page | [N14](notation.md#n14) |
|
|
115
221
|
| `[@source-id]` or `[@source-id; §1.2]` | `content/sources/*.json` | Numbered `[n]` superscript linking to a References section, with a hover/pin panel | `src/reference/remark-citation.mjs` |
|
|
222
|
+
| `[[sec-slug]]` or `[[lesson/slug#sec-slug]]` | A top-level heading; its anchor is the slug | `§ 1.1.2` linking to the section, with a hover card of its title and first paragraph | [structure.md § Section numbers](structure.md#section-numbers) |
|
|
223
|
+
| `[[ex-id]]` or `[[lesson/slug#ex-id]]` | A `<CompactExamples id>` | `Example 1.1.1` linking to the set, with a hover card of its title and its examples' names | [§ Knowledge checks and worked examples](#knowledge-checks-and-worked-examples) |
|
|
224
|
+
| `[[check-id]]` or `[[lesson/slug#check-id]]` | An assessment id in the lesson's `.checks.yml` | `Knowledge check 1.1.1` linking to the check, with a hover card of its title and its number of questions | [structure.md § Knowledge checks](structure.md#knowledge-checks) |
|
|
116
225
|
|
|
117
226
|
## Knowledge checks and worked examples
|
|
118
227
|
|
|
119
228
|
| Component | Import | Notes | Doc |
|
|
120
229
|
| --- | --- | --- | --- |
|
|
121
|
-
| `<AssessmentSet />` | `explico/components/assessments/AssessmentSet.astro` | Renders every check listed in the lesson's colocated `.checks.yml
|
|
122
|
-
| `<
|
|
230
|
+
| `<AssessmentSet />` | `explico/components/assessments/AssessmentSet.astro` | Renders every check listed in the lesson's colocated `.checks.yml`, each under its own heading; do not add a heading for it | [structure.md § Knowledge checks](structure.md#knowledge-checks) |
|
|
231
|
+
| `<CompactExamples id short>` + `<CompactExample label>` | `explico/components/examples/CompactExamples.astro`, `…/CompactExample.astro` | A numbered set of worked examples, one tab each; do not add a heading for it. A `<Diagram>` nested inside one is invisible to diagram numbering (see the raw/unwrapped note above) | [structure.md § Worked examples](structure.md#worked-examples) |
|
|
232
|
+
|
|
233
|
+
**You write the topic; the engine writes the kind.** A knowledge check and a
|
|
234
|
+
worked-example set each draw their own `<h2>`: the kind's icon, then your
|
|
235
|
+
title, with a small label naming the kind and its number — "KNOWLEDGE CHECK
|
|
236
|
+
1.1.1", "EXAMPLE 1.1.1" — in the card's top-right corner. The check's title
|
|
237
|
+
is the `title` of its assessment file, the set's is its `short`. Write the
|
|
238
|
+
topic alone ("Position and coordinates"), never "Knowledge check: …" or
|
|
239
|
+
"Worked examples".
|
|
240
|
+
|
|
241
|
+
```mdx
|
|
242
|
+
<CompactExamples id="coordinate-conversions" short="Calculation examples between coordinate systems">
|
|
243
|
+
<CompactExample label="Cartesian to polar">
|
|
244
|
+
…
|
|
245
|
+
</CompactExample>
|
|
246
|
+
<CompactExample label="Polar to Cartesian">
|
|
247
|
+
…
|
|
248
|
+
</CompactExample>
|
|
249
|
+
</CompactExamples>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
renders as **⊞ Calculation examples between coordinate systems** under an
|
|
253
|
+
"EXAMPLE 1.1.1" corner label, with the examples as tabs below it. The label
|
|
254
|
+
sits outside the text flow, so the title keeps the whole line.
|
|
255
|
+
|
|
256
|
+
- **Numbered like a float, shown like a section.** A set is `Example
|
|
257
|
+
‹part›.‹chapter›.‹n›` and a check `Knowledge check ‹part›.‹chapter›.‹n›`, each
|
|
258
|
+
counting on its own (`numbering.floats`). The numbers follow the section
|
|
259
|
+
numbers' rules, since both blocks are sections of the page: shown on a wide
|
|
260
|
+
screen, in print and on a folded bar, hidden on a narrow screen, and never
|
|
261
|
+
when `numbering.sections.show` is off — then `[[ex-…]]` and `[[check-…]]`
|
|
262
|
+
print the title instead of the number.
|
|
263
|
+
- **Sections of the outline.** Each heading is a `##`: "On this page" lists
|
|
264
|
+
it by its title with the badge's icon, it ends the section before it, it
|
|
265
|
+
folds with the section chevron (`disclosure.knowledgeChecks`,
|
|
266
|
+
`disclosure.workedExamples`), its chain icon copies its link, and rules
|
|
267
|
+
[S6](structure-rules.md#s6) and [S7](structure-rules.md#s7) read it as a
|
|
268
|
+
`##` — place a set where a `##` section could start, and write no heading
|
|
269
|
+
directly above it.
|
|
270
|
+
- **The label's form is a course setting**, `blockLabels`: `icon-word` (the
|
|
271
|
+
default) or `icon`, which leaves the corner label to the number and keeps
|
|
272
|
+
the word for a screen reader.
|
|
123
273
|
|
|
124
274
|
## Choosing between the "explain a term" options
|
|
125
275
|
|
|
@@ -136,3 +286,9 @@ From lightest to heaviest — pick the first one that's actually enough:
|
|
|
136
286
|
4. **`<Memo>`** — numbered, permalinked, holds real sub-content (proofs,
|
|
137
287
|
figures, tables). Use when the aside is long enough to be its own small
|
|
138
288
|
section.
|
|
289
|
+
|
|
290
|
+
Industry jargon — an informal expression with no standard definition — is
|
|
291
|
+
not explained by a tooltip or an abbreviation card alone. It gets a
|
|
292
|
+
`<ShortNote>` or `<Memo>` labelled "Industry jargon" that states its
|
|
293
|
+
approximate meaning, context of use, and standardization; see
|
|
294
|
+
[P6](prose.md#p6).
|