[Docs] Author math with remark-math ($...$) instead of <Math formula> strings; add macros

Aperta
#374 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
markdown
Ambito
documentation

Direzione di ricerca

Start with docs/astro.config.mjs, docs/src/components/Math.astro, and the listed MDX pages; inspect the remark-math and rehype-katex configuration and current formula usage. Convert the formulas, add shared macros and equation references, and document the macros in CONTENT_GUIDE. Done means no <Math> usage remains and npm run build fails for an invalid formula; the issue leaves equation numbering and the optional MathML output open to implementation choices.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: docs-site priority: P2 size: M type: enhancement

Summary

remark-math/rehype-katex are configured but no page uses them; formulas are passed as JS template strings to <Math formula={\vec{p}}>, which doubles every backslash and breaks editor tooling. There are no shared macros or equation references.

Location

  • docs/astro.config.mjs:10-13
  • docs/src/components/Math.astro:1-30
  • docs/src/content/docs/pyspace/ray-marching.mdx:27-35

Evidence

ray-marching.mdx:29  formula={`\\vec{p}_{n+1} = \\vec{p}_n + \\vec{d} \\cdot \\text{SDF}(\\vec{p}_n)`}
grep -l '<Math' docs/src/content -r | wc -l -> 10 files ; pages using $..$ syntax -> 0

Expected

Authors write $x_{n+1} = r x_n (1-x_n)$ and $$...$$ in MDX; KaTeX renders at build time with shared macros and numbered, linkable equations.

Proposed fix

  1. Codemod <Math formula={...} displayMode /> -> $$...$$ (un-escape backslashes) across 10 files; delete Math.astro.
  2. katex options: macros from src/math/macros.ts (\R, \N, \Z, \vec, \norm, \abs...), strict: 'warn', throwOnError: true in CI so bad TeX fails the build.
  3. Equation labels via \label{eq:lorenz} + \eqref (KaTeX trust for \htmlId) or a small rehype plugin.
  4. Optional: MathML output for accessibility (output: 'htmlAndMathml').

Acceptance criteria

  • No <Math usage remains
  • A deliberately invalid formula fails npm run build
  • Macros documented in CONTENT_GUIDE

Repository audit, November 2026 · Phase 7 · Docs platform · evidence: reproduced · ref platform-026


Generated by Claude Code

Lingua principale
C++
Stelle
2
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ibra-kdbra/Math-Problems

Tutte le issue di ibra-kdbra/Math-Problems

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.