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

Open
#374 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
markdown
Domain
documentation

Research direction

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.

Written by the indexing model from the issue text.

Description

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

Dominant language
C++
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ibra-kdbra/Math-Problems

All issues in ibra-kdbra/Math-Problems

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.