diff --git a/.github/skills/glossary-references/SKILL.md b/.github/skills/glossary-references/SKILL.md index 5bef7c79..30e71fb7 100644 --- a/.github/skills/glossary-references/SKILL.md +++ b/.github/skills/glossary-references/SKILL.md @@ -21,7 +21,7 @@ Every glossary sidebar reference uses Quarto's native `{.column-margin}` contain ::: {.column-margin} ** ($$ hold if applicable)** . -[ Glossary →](resources/-glossary.qmd#) +[ Glossary →](resources//-glossary.qmd#) ::: ``` @@ -34,7 +34,7 @@ A lens is considered a **thin lens** when its axial thickness is negligible comp ::: {.column-margin} **Radius of curvature ($R$)** Linear distance from the surface vertex to the center of the sphere of curvature. -[Optics Glossary →](resources/optics-glossary.qmd#sec-glossary-surfaces) +[Optics Glossary →](resources/optics/optics-glossary.qmd#sec-glossary-surfaces) ::: ``` @@ -71,10 +71,10 @@ When linking, use relative paths from `chapters/`: | Domain | Resource File Path (relative to `chapters/`) | Primary Topics Covered | |:-------|:---------------------------------------------|:-----------------------| -| **Optics** | `resources/optics-glossary.qmd` | Surface geometry ($R, C$), focal length ($f$), conjugate image distance ($d_i$), sensor distance ($d_s$), circle of confusion | -| **Sensors** | `resources/sensors-glossary.qmd` | Pixel pitch, fill factor, quantum efficiency (QE), full well capacity (FWC), read noise, dynamic range (DR), conversion gain | -| **Human Vision** | `resources/human-glossary.qmd` | Visual angle, cycles per degree (cpd), luminance vs. illuminance, photopic/scotopic, DVA, cone mosaics | -| **Displays** | `resources/displays-glossary.qmd` | Luminance (nits/$\text{cd/m}^2$), color gamut, subpixel layout, display gamma ($\gamma$), refresh rate, viewing angle | +| **Optics** | `resources/optics/optics-glossary.qmd` | Surface geometry ($R, C$), focal length ($f$), conjugate image distance ($d_i$), sensor distance ($d_s$), circle of confusion | +| **Sensors** | `resources/sensors/sensors-glossary.qmd` | Pixel pitch, fill factor, quantum efficiency (QE), full well capacity (FWC), read noise, dynamic range (DR), conversion gain | +| **Human Vision** | `resources/human/human-glossary.qmd` | Visual angle, cycles per degree (cpd), luminance vs. illuminance, photopic/scotopic, DVA, cone mosaics | +| **Displays** | `resources/displays/displays-glossary.qmd` | Luminance (nits/$\text{cd/m}^2$), color gamut, subpixel layout, display gamma ($\gamma$), refresh rate, viewing angle | --- diff --git a/.github/skills/interactive-figures/SKILL.md b/.github/skills/interactive-figures/SKILL.md index acde3ab2..1a0c5938 100644 --- a/.github/skills/interactive-figures/SKILL.md +++ b/.github/skills/interactive-figures/SKILL.md @@ -1,22 +1,55 @@ --- name: interactive-figures -description: Create, modify, embed, format, or diagnose client-side interactive figures using Observable JS (OJS) or self-contained HTML/Canvas 3D iframe visualizations in Quarto book chapters. +description: Create, modify, embed, format, or diagnose client-side interactive figures using self-contained HTML/SVG/JS includes, Observable JS (OJS), or Canvas 3D iframe visualizations in Quarto book chapters. --- # Interactive Figures with Quarto -## Summary +## Summary & General Requirement -This project embeds interactive, client-side scientific visualizations and simulations directly into book chapters. All computation runs entirely in the reader's web browser without a server-side computational kernel, using **two complementary patterns**: +This project embeds interactive, client-side scientific visualizations and simulations directly into book chapters. All computation runs entirely in the reader's web browser without a server-side computational kernel. -1. **Pattern A — Observable JS (OJS) & Observable Plot (Default for 2D):** Use for analytical equations, standard 2D scientific curves, and reactive parameter sweeps with sliders/inputs. Shares page typography and responsive width natively with no `_quarto.yml` resource entries needed. +> **General Requirement — Keep Chapter `.qmd` Files Clean via Includes:** +> Do **not** inline long interactive HTML, CSS, JavaScript, or OJS visualization code directly inside a chapter `.qmd` file. Place the interactive code in a standalone file under **`chapters/includes/figures/.qmd`** (keep this directory flat—do not create subdirectories under `chapters/includes/figures/`) and embed it in the chapter with `{{< include includes/figures/.qmd >}}` inside a `::: {.content-visible when-format="html"}` block. + +We use **three complementary patterns**: + +1. **Pattern A — Self-Contained HTML/SVG/JS Include (` ```{=html} `, Default for 2D & Pan/Zoom):** Place a self-contained `{=html}` block (controls + SVG/Canvas/image + vanilla JS) in `chapters/includes/figures/.qmd` and include it with `{{< include includes/figures/.qmd >}}`. Works offline with zero external dependencies, requires no `_quarto.yml` resource entries, and triggers no Quarto OJS warnings. 2. **Pattern B — Self-Contained HTML / Canvas 3D (`