# Contributing and Wiki Maintenance ## Editing principles - **Write once, reference everywhere.** The module chapter is the source of truth; other pages link to it. - **Derive, don't assert.** Every boxed result should be derived or clearly attributed. - **Check every number.** Worked examples must be verifiable by hand and ideally by a short script. - **Cite sources** at the end of the chapter (authors, year, title, venue; arXiv ID if available). ## Chapter template Use the same H2 headings in every chapter so sidebar anchors keep working: `Overview and learning goals` · `Beginner: the big picture` · `Core concepts and derivations` · `Worked example` · `Implementation` · `Advanced topics` · `Pitfalls and best practices` · `Conceptual questions and answers` · `Sources and further reading`. ## Mathematics (GitHub-flavoured LaTeX) - **Syntax.** Write inline math as dollar, backtick, formula, backtick, dollar, and display math inside a fenced code block whose language is `math`. GitHub parses these as code *before* Markdown emphasis, so underscores, asterisks and backslashes in formulas cannot be misread (plain dollar-delimited math broke on formulas such as `u_i ... v_j`). No space padding inside the delimiters. - Use `\lVert x\rVert` and `\lvert x\rvert` (not `|x|`) so tables do not break; use `\mid` for conditioning. - **GitHub restricts which LaTeX macros it renders.** `\operatorname` is rejected ("The following macros are not allowed"): write `\mathrm{softmax}` instead. Also avoid `\newcommand`, `\def`, `\require`, `\href`, `\class`, `\style`, `\tfrac`, `\dfrac`, `\texttt`, `\boldsymbol` and `\bm` (use `\mathbf{...}`). The linter enforces this list. - Use `aligned` inside display math (not `align`). No Unicode maths symbols outside math. Do not put equations in ordinary code spans. - Define symbols and tensor shapes next to the equation; follow the [notation cheat sheet](/anuxlab/deep-learning-systems/wiki/Mathematical-Foundations). ## Diagrams and figures - Diagrams: fenced `mermaid` blocks; quote node labels that contain punctuation (`A["text (x)"]`); no `$` inside Mermaid. - Figures: store images in `images/` and embed them with the raw URL `![alt](https://raw.githubusercontent.com/wiki/OWNER/REPO/images/name.png)` (the build does this automatically); add a caption naming the source. Generate plots with scripts committed to `figures/`. - Third-party material: record author, URL, licence and modifications in [Figures and attribution](/anuxlab/deep-learning-systems/wiki/Figures-and-Attribution); do not copy images with unclear licences. ## Links Use root-relative wiki paths — `[text](/OWNER/REPO/wiki/Module-01#core-concepts-and-derivations)` — or `[[Text|Page-Name]]` wiki links. Plain relative links such as `(Module-01)` depend on the URL of the page that contains them and can break on the wiki root page. ## Questions and answers Each chapter ends with Q&A in collapsible blocks (`
` / `Qn. ...`; leave a blank line after ``). Prefer questions that test understanding (derive, compare, diagnose) over recall. ## Validation Run the linter before committing: ```bash python3 tools/lint_wiki.py . ``` It checks internal links and anchors, image files, math hazards (odd `$`, padded inline math, `|` inside table math, Unicode symbols), duplicate heading slugs, unbalanced code fences/`
`, and Mermaid diagram headers. Then preview a few pages on GitHub (the renderer is the final judge) before pushing. ## Publishing This folder is a clone of the GitHub wiki repository. Commit and push (`git add -A && git commit && git push`); GitHub Wikis support one global `_Sidebar.md` and `_Footer.md`.