---
title: "Formatting tour: math, diagrams, code, tables"
url: https://memory.wiki/F1q9U1YP
updated: 2026-05-14T17:52:48.410Z
hub: https://memory.wiki/hub/demo
bundle_count: 1
concept_count: 12
source: "memory.wiki"
---
# Formatting tour: math, diagrams, code, tables

A reference for what renders in mdfy. Every block below appears in real docs across this hub.

## KaTeX math

Inline: $E = mc^2$. Display:

$$
\int_0^{\infty} e^{-x^2}\, dx = \frac{\sqrt{\pi}}{2}
$$

Matrix:

$$
\begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ax + by \\ cx + dy \end{pmatrix}
$$

## Mermaid diagrams

```mermaid
flowchart LR
  Doc[(Doc)] --> Bundle((Bundle))
  Bundle --> Hub[/Hub/]
  Hub --> AI[Any AI]
  AI -. cites .-> Doc
```

```mermaid
sequenceDiagram
  participant U as You
  participant M as mdfy
  participant AI as Claude/ChatGPT
  U->>M: Publish doc
  M-->>U: Permanent URL
  U->>AI: Paste URL
  AI->>M: Fetch /raw/<id>
  M-->>AI: Clean markdown + graph
```

## Code with highlighting

```typescript
const res = await fetch("https://mdfy.app/api/hub/demo/recall", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ question: "react hooks", k: 5, rerank: true }),
});
const { results } = await res.json();
```

```python
import requests

r = requests.post("https://mdfy.app/api/docs",
  json={"markdown": "# Hello World"})
print(r.json()["url"])  # → "https://mdfy.app/abc123"
```

## Tables

| Scope | URL | Cost |
|:------|:----|:-----|
| Doc | `mdfy.app/<id>` | tightest |
| Bundle | `mdfy.app/b/<id>` | mid (+graph) |
| Hub | `mdfy.app/hub/<slug>` | broad |

That's the rendering vocabulary mdfy expects to handle on any doc.


---

## Concepts in this document
- **mdfy** _(entity)_
  A tool that stores project context and decision history, integrated into Cursor via custom rules.
- **Claude** _(entity)_
  Anthropic's AI model cited as an example of vendor lock-in through projects and memory features.
- **ChatGPT** _(entity)_
  Example of an AI provider whose memory feature is intentionally confined to its own product.
- **Hub-shaped memory** _(concept)_
  The chosen architecture where users author structured notes as URL-addressable resources that the AI reads, preserving human control over memory curation.
- **Knowledge Management** _(tag)_
  Domain of organizing, storing, and retrieving information for human and AI use.
- **Vector recall** _(concept)_
  Memory pattern using embeddings and cosine similarity retrieval; trades precision for breadth but risks memory drift beyond user control.
- **URL-addressable knowledge** _(concept)_
  Design principle enabling AI systems to read structured user-authored content from persistent, addressable locations outside the AI interface.
- **Episodic snapshots** _(concept)_
  Memory pattern storing full conversation transcripts indexed by date and topic; trades verbosity for fidelity but also risks uncontrolled memory drift.
- **Composable scopes** _(concept)_
  Three-tier architecture (doc, bundle, hub) that scales from single notes to full knowledge graphs.
- **Andrej Karpathy** _(entity)_
  The originator of the LLM wiki concept presented in a 2024 Twitter thread.
- **AI Memory** _(tag)_
  Broad category encompassing how AI systems maintain and access knowledge across sessions.
- **Human-authored memory** _(concept)_
  The core principle that durable AI memory comes from deliberate human writing, not lossy inference from chat transcripts.

## Concept relations (within this doc's concepts)
- **Vector recall** implemented by **ChatGPT**
- **Episodic snapshots** implemented by **Claude**
- **Hub-shaped memory** implemented by **mdfy**
- **Composable scopes** enables pattern **URL-addressable knowledge**
- **Hub-shaped memory** implements principle **Human-authored memory**
- **Composable scopes** extends architecture **Hub-shaped memory**
- **URL-addressable knowledge** enables approach **Hub-shaped memory**
- **mdfy** implements pattern **Hub-shaped memory**
- **mdfy** provides architecture **Composable scopes**
- **mdfy** integrates with **Claude**
- **mdfy** solves problem for **ChatGPT**
- **Hub-shaped memory** depends on **URL-addressable knowledge**

## Bundles containing this document
- [AI Memory Research](https://memory.wiki/b/wa-K_2rF)
  > Captured conversations + external reading on how AI memory architectures actually work. Reading order: the Claude conversation lays out the three patterns, the Karpathy summary names the philosophical

_Hub canonical:_ https://memory.wiki/hub/demo
_Concept digest:_ https://memory.wiki/raw/hub/demo?digest=1&compact=1
