# Bringing paper to life: A modern template for scientific writing > Publish‑ready workflow that lets you focus on ideas, not infrastructure - **Authors**: Thibaud Frere - **Published**: Sep. 01, 2025 - **DOI**: https://doi.org/10.1234/abcd.efgh --- Welcome to this open source **research article template**. It helps you publish **clear**, **modern**, and **interactive technical writing** with **minimal setup**. Read time: 20–25 minutes. Grounded in up to date good practices in web dev, it favors **interactive explanations**, **clear notation**, and **inspectable examples** over static snapshots. Available on [GitHub](https://github.com/tfrere/research-article-template) deployable on [Hugging Face Spaces](https://huggingface.co/spaces/tfrere/research-article-template). #### Features Markdown-based KaTeX math Syntax highlighting Academic citations Footnotes Table of contents Mermaid diagrams Plotly ready D3.js ready HTML embeds Gradio app embeds Dataviz color palettes Optimized images Lightweight bundle SEO friendly Automatic build Automatic PDF export Dark theme Mobile friendly Latex import Template update system If you have questions, remarks or suggestions, open a discussion on the [Community tab](https://huggingface.co/spaces/tfrere/research-article-template/discussions?status=open&type=discussion)! ## Introduction The web offers what static PDFs can’t: **interactive diagrams**, **progressive notation**, and **exploratory views** that show how ideas behave. This template treats **interactive artifacts**—figures, math, code, and inspectable experiments—as **first‑class** alongside prose, helping readers **build intuition** instead of skimming results. ### Who is this for Ideal for anyone creating **web‑native** and **interactive** content with **minimal setup**: - For **scientists** writing modern web‑native papers - For **educators** building explorable lessons. **No web knowledge required**—just write in **Markdown**. This is not a CMS or a multi‑page blog—it's a **focused**, **single‑page**, **MDX‑first** workflow. ### Inspired by Distill This project stands in the direct continuity of [Distill](https://distill.pub/) (2016–2021). Our goal is to carry that spirit forward and push it even further: **accessible scientific writing**, **high‑quality interactive explanations**, and **reproducible**, production‑ready demos. Articles published with the template are collected in the [Research Article Gallery](https://huggingface.co/spaces/tfrere/research-article-gallery). ## Getting Started ### Installation The fastest way to get started is with **npx**: ```bash npx create-research-article my-paper ``` You can also pick a template directly: ```bash npx create-research-article my-paper --layout article npx create-research-article my-paper --layout paper ``` The CLI guides you through the setup: project name, metadata (title, authors, affiliations), and template choice. It also offers to **create and deploy a Hugging Face Space** automatically if you have `huggingface-cli` installed. Once done: ```bash cd my-paper/app npm run dev ``` **You're ready to go!** 🎉 > Requires **Node.js 20 or newer**. To manage versions, consider [nvm](https://github.com/nvm-sh/nvm) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows). **Alternative: duplicate the Space on Hugging Face** 1. Open **[Research Article Template](https://huggingface.co/spaces/tfrere/research-article-template)** and click **Duplicate this Space**. 2. Clone your new Space: ```bash git clone git@hf.co:spaces// cd /app git lfs install && git lfs pull npm install && npm run dev ``` ### Template variants The template ships two layouts. Switching is one line of `article.mdx` frontmatter, and it works the same here and in the collaborative editor: ```yaml template: "article" # default: centered hero, meta columns, line TOC, margin sidenotes, figure numbering template: "paper" # lighter: centered single column, no TOC, no figure numbering ``` You can also pick it when scaffolding: `npx create-research-article my-paper --layout paper`. The `article` layout is the one you are reading: - **Centered hero**: title, subtitle and a banner embed. `banner` takes any file in `embeds/`, `banner: false` hides it. - **Meta columns**: authors, affiliations, published date and DOI, plus a Resources column (PDF, Cite and your `links`). - **Line table of contents**: a reading-progress rail with H2 and H3, expanded by default. `tocExpanded: false` only opens the section being read. - **Sidenotes in the margin** from 1280px wide, inline below that. - **Heading anchors**: hover a heading to copy a link to it. ```yaml banner: "banner.html" # or false tocExpanded: true links: - label: "Code" url: "https://github.com/..." ``` In the `paper` layout, the same `links` show as pill buttons below the authors. Every width, gutter and breakpoint is a token in `app/src/styles/_grid.css`. To see the grid, add `?grid` to any URL, or press `G` in `npm run dev`; `Shift+G` toggles the baseline. Long titles are automatically balanced and downsized. You can force a line break with `\n` in the frontmatter: ```yaml title: "Why Open-Source LLMs\nAre Reshaping the AI Landscape" ``` ### Development ```bash npm run dev ``` Once started, the dev server is available at `http://localhost:4321`. ### Build ```bash npm run build ``` ### Deploy Push to your Hugging Face Space to trigger an automatic build and deploy: ```bash git add . git commit -m "Update content" git push space main ``` If you haven't set up a Space yet: ```bash # create a Docker Space at huggingface.co/new-space, then: git remote add space git@hf.co:spaces// git push space main ``` > Serving the `dist/` directory on any static host also works. > A [slugified-title].pdf and thumb.jpg are generated at build time in the public folder. ### Template Synchronization Keep your project up-to-date with the latest template improvements. The sync system fetches the most recent changes from the official template repository at `https://huggingface.co/spaces/tfrere/research-article-template` and copies them to your project. ```bash # Preview what would be updated npm run sync:template -- --dry-run # Update template files (preserves your content) npm run sync:template ``` **What gets preserved:** - Your content in `/src/content/` **What gets updated:** - All template files (components, styles, configuration) - Dockerfile and deployment configuration - Dependencies and build system ## Writing your content Once you have set up your project and started the development server, you can start writing your article. ### Content structure Your **article** lives in **one and unique place**. The `content` folder. ### Article.mdx The `article.mdx` file is the **main entry point** of your article which contains **2 main parts**. > **MDX** is a mix of **Markdown** and **HTML/JSX**: write regular [Markdown](#markdown) and [Components](#components) when needed. We’ll describe the available options you can use later in this guide. #### **Frontmatter** Metadata and options for the article. Each of them is described in the table below. **Frontmatter** in app/src/content/article.mdx ```mdx --- title: "This is the main title" subtitle: "This will be displayed just below the banner" description: "A modern, MDX-first research article template with math, citations, and interactive figures." published: "Feb 19, 2025" tags: - research - template authors: - name: "Thibaud Frere" url: "https://huggingface.co/tfrere" affiliations: [1] - name: "Alice Martin" url: "https://example.com/~alice" affiliations: [1, 2] - name: "Robert Brown" url: "https://example.com/~bob" affiliations: [2] affiliations: - name: "Hugging Face" url: "https://huggingface.co" - name: "Example University" url: "https://example.edu" doi: 10.1234/abcd.efgh licence: Diagrams and text are licensed under [CC‑BY 4.0](https://creativecommons.org/licenses/by/4.0/) with the source available on [Hugging Face](https://huggingface.co/spaces/stfrere/research-article-template), unless noted otherwise. Figures reused from other sources are excluded and marked in their captions ("Figure from …"). seoThumbImage: "https://example.com/thumb.png" banner: "banner.html" tocExpanded: true pdfProOnly: false showPdf: true links: - label: "Code" url: "https://github.com/..." --- ``` | Field | Required | Notes | Type | | --- | --- | --- | --- | | title | Yes | Main title; supports line breaks with "\n" (falls back to "Untitled article") | string | | subtitle | Yes | Shown just below the title | string | | description | Yes | Used for SEO/meta description | string | | published | Yes | e.g., "2025-02-19" or readable date | string/date | | tags | No | List of keywords | string[] | | authors | No | Affiliation indices refer to the `affiliations` list | `string[] or { name, url?, affiliations? }[]` | | affiliations | No | Alias: `affiliation` (single or array) | `{ name, url? }[]` | | doi | No | DOI identifier | string | | licence | No | Rendered in footer; HTML supported | string (HTML allowed) | | seoThumbImage | No | Overrides default OpenGraph image | string (URL) | | banner | No | Banner embed filename in `app/src/content/embeds`, `false` hides it. Default: `"banner.html"` | string or `false` | | tocExpanded | No | TOC sub-headings always expanded (`true`, default) or only for the section being read (`false`). Legacy alias: `tableOfContentsAutoCollapse: true` | boolean | | links | No | Extra links shown under the PDF / Cite buttons in the hero (Code, Checkpoints...) | `{ label, url }[]` | | pdfProOnly | No | Gate PDF download to Pro users only. Shows "Subscribe to Pro" button for non-Pro users | boolean | | showPdf | No | Show or hide PDF section in metadata. Default: `true` | boolean | #### **Content** Your story. Write your content here. **Content** in app/src/content/article.mdx ```mdx This paragraph is written in Markdown. A short callout inserted via a component. This paragraph is also written in Markdown. ``` #### Chapters **If** your article becomes **too long** for one file, you can **organize** it into **separate chapters**. Simply **create a new file** in the `app/src/content/chapters` **directory**. Then, **include** your new chapter in the main `article.mdx` like below. Example ```mdx ``` You can see a living example here app/src/content/chapters/best-practices.mdx. ### **Table of contents** The **Table of contents** is generated **automatically** from your **H2** and **H3** headings. Keep headings **short** and **descriptive**; links work on **desktop** and **mobile**. Every heading also gets a link icon on hover: clicking it copies the URL of that section. > Sub-headings are expanded by default. Set `tocExpanded: false` in the [frontmatter](#frontmatter) to only expand the section being read. ### Layout grid The page sits on a single grid with **named columns**: a **rail** for the table of contents, the **body** for text and figures, and a **margin** column for sidenotes. `` blocks span the body and the margin, `` blocks span the whole screen. All widths, gutters and offsets are **CSS variables** in `app/src/styles/_grid.css`, so adjusting the layout means editing a few values there. To see the grid, press **G** while running `npm run dev`, or add `?grid` to the URL of any build (**Shift+G** toggles the baseline). ### Theme All **interactive elements** (buttons, inputs, cards, etc.) are themed with the **primary color** you choose. You can **update this main color** to match your brand by changing the `--primary-color` variable in the `app/src/styles/_variables.css` file. Use the **color picker** below to see how the primary color affects the theme. #### Brand color You can use the color picker to select the right color. Here is an example of an [interactive element](#). #### Color palettes Here is a suggestion of **color palettes** for your **data visualizations** that align with your **brand identity**. These palettes are generated from your `--primary-color`. **Use color with care.** Color should rarely be the only channel of meaning. Always pair it with text, icons, shape or position. The simulation helps you spot palettes and states that become indistinguishable for people with color‑vision deficiencies. #### Using the palettes You can copy them manually from the palette viewer just above, or fetch colors via `window.ColorPalettes.getColors(key, count)` where `key` is one of `'categorical'`, `'sequential'`, `'diverging'`, and `count` is the desired number of colors (defaults to 6). ```js // Usage (with explicit counts) const cat = window.ColorPalettes.getColors('categorical', 8); const seq = window.ColorPalettes.getColors('sequential', 8); const div = window.ColorPalettes.getColors('diverging', 7); // For current primary color string const primaryHex = window.ColorPalettes.getPrimary(); // If you change --primary-color dynamically, call refresh to notify listeners document.documentElement.style.setProperty('--primary-color', '#6D4AFF'); window.ColorPalettes.refresh(); ``` ## Markdown All the following **markdown features** are available **natively** in the `article.mdx` file. No imports needed, just write markdown directly: **Text formatting** — `**Bold**` → **Bold**, `*italic*` → *italic*, `~~strikethrough~~` → ~~strikethrough~~ **Code** — `` `inline code` `` → `inline code`, triple backticks for code blocks **Lists** — `- Item` for bullets, `1. Item` for numbered lists with nesting support **Links** — `[text](url)` → [External links](https://example.com) and internal navigation **Highlight** — `text` → Highlighted text for emphasis See also the complete [**Markdown documentation**](https://www.markdownguide.org/basic-syntax/). **Advanced features** — Explore specialized content types: [ Math LaTeX equations ](#math) [ Code Syntax highlighting ](#code-blocks) [ Citation Academic references ](#citation-and-notes) [ Footnote Additional context ](#footnote) [ Mermaid Diagrams & flowcharts ](#mermaid-diagrams) [ Separator Visual breaks ](#separator) [ Table Data presentation ](#table) [ Audio Sound embeds ](#audio) ### Math **KaTeX** provides full LaTeX math support with two simple syntaxes: **Inline math** — Use `$... Welcome to this open source **research article template**. It helps you publish **clear**, **modern**, and **interactive technical writing** with **minimal setup**. Read time: 20–25 minutes. Grounded in up to date good practices in web dev, it favors **interactive explanations**, **clear notation**, and **inspectable examples** over static snapshots. Available on [GitHub](https://github.com/tfrere/research-article-template) deployable on [Hugging Face Spaces](https://huggingface.co/spaces/tfrere/research-article-template). #### Features Markdown-based KaTeX math Syntax highlighting Academic citations Footnotes Table of contents Mermaid diagrams Plotly ready D3.js ready HTML embeds Gradio app embeds Dataviz color palettes Optimized images Lightweight bundle SEO friendly Automatic build Automatic PDF export Dark theme Mobile friendly Latex import Template update system If you have questions, remarks or suggestions, open a discussion on the [Community tab](https://huggingface.co/spaces/tfrere/research-article-template/discussions?status=open&type=discussion)! ## Introduction The web offers what static PDFs can’t: **interactive diagrams**, **progressive notation**, and **exploratory views** that show how ideas behave. This template treats **interactive artifacts**—figures, math, code, and inspectable experiments—as **first‑class** alongside prose, helping readers **build intuition** instead of skimming results. ### Who is this for Ideal for anyone creating **web‑native** and **interactive** content with **minimal setup**: - For **scientists** writing modern web‑native papers - For **educators** building explorable lessons. **No web knowledge required**—just write in **Markdown**. This is not a CMS or a multi‑page blog—it's a **focused**, **single‑page**, **MDX‑first** workflow. ### Inspired by Distill This project stands in the direct continuity of [Distill](https://distill.pub/) (2016–2021). Our goal is to carry that spirit forward and push it even further: **accessible scientific writing**, **high‑quality interactive explanations**, and **reproducible**, production‑ready demos. Articles published with the template are collected in the [Research Article Gallery](https://huggingface.co/spaces/tfrere/research-article-gallery). ## Getting Started ### Installation The fastest way to get started is with **npx**: ```bash npx create-research-article my-paper ``` You can also pick a template directly: ```bash npx create-research-article my-paper --layout article npx create-research-article my-paper --layout paper ``` The CLI guides you through the setup: project name, metadata (title, authors, affiliations), and template choice. It also offers to **create and deploy a Hugging Face Space** automatically if you have `huggingface-cli` installed. Once done: ```bash cd my-paper/app npm run dev ``` **You're ready to go!** 🎉 > Requires **Node.js 20 or newer**. To manage versions, consider [nvm](https://github.com/nvm-sh/nvm) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows). **Alternative: duplicate the Space on Hugging Face** 1. Open **[Research Article Template](https://huggingface.co/spaces/tfrere/research-article-template)** and click **Duplicate this Space**. 2. Clone your new Space: ```bash git clone git@hf.co:spaces// cd /app git lfs install && git lfs pull npm install && npm run dev ``` ### Template variants The template ships two layouts. Switching is one line of `article.mdx` frontmatter, and it works the same here and in the collaborative editor: ```yaml template: "article" # default: centered hero, meta columns, line TOC, margin sidenotes, figure numbering template: "paper" # lighter: centered single column, no TOC, no figure numbering ``` You can also pick it when scaffolding: `npx create-research-article my-paper --layout paper`. The `article` layout is the one you are reading: - **Centered hero**: title, subtitle and a banner embed. `banner` takes any file in `embeds/`, `banner: false` hides it. - **Meta columns**: authors, affiliations, published date and DOI, plus a Resources column (PDF, Cite and your `links`). - **Line table of contents**: a reading-progress rail with H2 and H3, expanded by default. `tocExpanded: false` only opens the section being read. - **Sidenotes in the margin** from 1280px wide, inline below that. - **Heading anchors**: hover a heading to copy a link to it. ```yaml banner: "banner.html" # or false tocExpanded: true links: - label: "Code" url: "https://github.com/..." ``` In the `paper` layout, the same `links` show as pill buttons below the authors. Every width, gutter and breakpoint is a token in `app/src/styles/_grid.css`. To see the grid, add `?grid` to any URL, or press `G` in `npm run dev`; `Shift+G` toggles the baseline. Long titles are automatically balanced and downsized. You can force a line break with `\n` in the frontmatter: ```yaml title: "Why Open-Source LLMs\nAre Reshaping the AI Landscape" ``` ### Development ```bash npm run dev ``` Once started, the dev server is available at `http://localhost:4321`. ### Build ```bash npm run build ``` ### Deploy Push to your Hugging Face Space to trigger an automatic build and deploy: ```bash git add . git commit -m "Update content" git push space main ``` If you haven't set up a Space yet: ```bash # create a Docker Space at huggingface.co/new-space, then: git remote add space git@hf.co:spaces// git push space main ``` > Serving the `dist/` directory on any static host also works. > A [slugified-title].pdf and thumb.jpg are generated at build time in the public folder. ### Template Synchronization Keep your project up-to-date with the latest template improvements. The sync system fetches the most recent changes from the official template repository at `https://huggingface.co/spaces/tfrere/research-article-template` and copies them to your project. ```bash # Preview what would be updated npm run sync:template -- --dry-run # Update template files (preserves your content) npm run sync:template ``` **What gets preserved:** - Your content in `/src/content/` **What gets updated:** - All template files (components, styles, configuration) - Dockerfile and deployment configuration - Dependencies and build system ## Writing your content Once you have set up your project and started the development server, you can start writing your article. ### Content structure Your **article** lives in **one and unique place**. The `content` folder. ### Article.mdx The `article.mdx` file is the **main entry point** of your article which contains **2 main parts**. > **MDX** is a mix of **Markdown** and **HTML/JSX**: write regular [Markdown](#markdown) and [Components](#components) when needed. We’ll describe the available options you can use later in this guide. #### **Frontmatter** Metadata and options for the article. Each of them is described in the table below. **Frontmatter** in app/src/content/article.mdx ```mdx --- title: "This is the main title" subtitle: "This will be displayed just below the banner" description: "A modern, MDX-first research article template with math, citations, and interactive figures." published: "Feb 19, 2025" tags: - research - template authors: - name: "Thibaud Frere" url: "https://huggingface.co/tfrere" affiliations: [1] - name: "Alice Martin" url: "https://example.com/~alice" affiliations: [1, 2] - name: "Robert Brown" url: "https://example.com/~bob" affiliations: [2] affiliations: - name: "Hugging Face" url: "https://huggingface.co" - name: "Example University" url: "https://example.edu" doi: 10.1234/abcd.efgh licence: Diagrams and text are licensed under [CC‑BY 4.0](https://creativecommons.org/licenses/by/4.0/) with the source available on [Hugging Face](https://huggingface.co/spaces/stfrere/research-article-template), unless noted otherwise. Figures reused from other sources are excluded and marked in their captions ("Figure from …"). seoThumbImage: "https://example.com/thumb.png" banner: "banner.html" tocExpanded: true pdfProOnly: false showPdf: true links: - label: "Code" url: "https://github.com/..." --- ``` | Field | Required | Notes | Type | | --- | --- | --- | --- | | title | Yes | Main title; supports line breaks with "\n" (falls back to "Untitled article") | string | | subtitle | Yes | Shown just below the title | string | | description | Yes | Used for SEO/meta description | string | | published | Yes | e.g., "2025-02-19" or readable date | string/date | | tags | No | List of keywords | string[] | | authors | No | Affiliation indices refer to the `affiliations` list | `string[] or { name, url?, affiliations? }[]` | | affiliations | No | Alias: `affiliation` (single or array) | `{ name, url? }[]` | | doi | No | DOI identifier | string | | licence | No | Rendered in footer; HTML supported | string (HTML allowed) | | seoThumbImage | No | Overrides default OpenGraph image | string (URL) | | banner | No | Banner embed filename in `app/src/content/embeds`, `false` hides it. Default: `"banner.html"` | string or `false` | | tocExpanded | No | TOC sub-headings always expanded (`true`, default) or only for the section being read (`false`). Legacy alias: `tableOfContentsAutoCollapse: true` | boolean | | links | No | Extra links shown under the PDF / Cite buttons in the hero (Code, Checkpoints...) | `{ label, url }[]` | | pdfProOnly | No | Gate PDF download to Pro users only. Shows "Subscribe to Pro" button for non-Pro users | boolean | | showPdf | No | Show or hide PDF section in metadata. Default: `true` | boolean | #### **Content** Your story. Write your content here. **Content** in app/src/content/article.mdx ```mdx This paragraph is written in Markdown. A short callout inserted via a component. This paragraph is also written in Markdown. ``` #### Chapters **If** your article becomes **too long** for one file, you can **organize** it into **separate chapters**. Simply **create a new file** in the `app/src/content/chapters` **directory**. Then, **include** your new chapter in the main `article.mdx` like below. Example ```mdx ``` You can see a living example here app/src/content/chapters/best-practices.mdx. ### **Table of contents** The **Table of contents** is generated **automatically** from your **H2** and **H3** headings. Keep headings **short** and **descriptive**; links work on **desktop** and **mobile**. Every heading also gets a link icon on hover: clicking it copies the URL of that section. > Sub-headings are expanded by default. Set `tocExpanded: false` in the [frontmatter](#frontmatter) to only expand the section being read. ### Layout grid The page sits on a single grid with **named columns**: a **rail** for the table of contents, the **body** for text and figures, and a **margin** column for sidenotes. `` blocks span the body and the margin, `` blocks span the whole screen. All widths, gutters and offsets are **CSS variables** in `app/src/styles/_grid.css`, so adjusting the layout means editing a few values there. To see the grid, press **G** while running `npm run dev`, or add `?grid` to the URL of any build (**Shift+G** toggles the baseline). ### Theme All **interactive elements** (buttons, inputs, cards, etc.) are themed with the **primary color** you choose. You can **update this main color** to match your brand by changing the `--primary-color` variable in the `app/src/styles/_variables.css` file. Use the **color picker** below to see how the primary color affects the theme. #### Brand color You can use the color picker to select the right color. Here is an example of an [interactive element](#). #### Color palettes Here is a suggestion of **color palettes** for your **data visualizations** that align with your **brand identity**. These palettes are generated from your `--primary-color`. **Use color with care.** Color should rarely be the only channel of meaning. Always pair it with text, icons, shape or position. The simulation helps you spot palettes and states that become indistinguishable for people with color‑vision deficiencies. #### Using the palettes You can copy them manually from the palette viewer just above, or fetch colors via `window.ColorPalettes.getColors(key, count)` where `key` is one of `'categorical'`, `'sequential'`, `'diverging'`, and `count` is the desired number of colors (defaults to 6). ```js // Usage (with explicit counts) const cat = window.ColorPalettes.getColors('categorical', 8); const seq = window.ColorPalettes.getColors('sequential', 8); const div = window.ColorPalettes.getColors('diverging', 7); // For current primary color string const primaryHex = window.ColorPalettes.getPrimary(); // If you change --primary-color dynamically, call refresh to notify listeners document.documentElement.style.setProperty('--primary-color', '#6D4AFF'); window.ColorPalettes.refresh(); ``` for equations within text: $x^2 + y^2 = z^2$ **Block math** — Use `$...$` for centered equations: $ \mathrm{Attention}(Q,K,V)=\mathrm{softmax}\!\left(\frac{QK^\top}{\sqrt{d_k}}\right) V $ **Advanced features** — Aligned equations with IDs for cross-referencing: ```math \htmlId{trajectory_definition}{\begin{align} \log p_\theta(\mathcal D) &= \log \sum_{i=0}^N p_\theta ((o,a)_i) \\ &= \log \sum_{i=0}^N \int_{\text{supp}({Z})} p_\theta((o,a)_i \vert z) p(z) \\ &= \log \sum_{i=0}^N \int_{\text{supp}({Z})} \frac{q_\theta(z \vert (o,a)_i)}{q_\theta(z \vert (o,a)_i)} \cdot p_\theta((o,a)_i \vert z) p(z) \\ &= \log \sum_{i=0}^N \mathbb E_{z \sim p_\theta(\bullet \vert (o,a)_i)} [\frac{p(z)}{q_\theta(z \vert (o,a)_i)} \cdot p_\theta((o,a)_i \vert z)], \end{align}} ``` You can reference equations with links like [this equation](#trajectory_definition). ```mdx $x^2 + y^2 = z^2$ $ \mathrm{Attention}(Q,K,V)=\mathrm{softmax}\!\left(\frac{QK^\top}{\sqrt{d_k}}\right) V $ $ \htmlId{trajectory_definition}{\begin{align} \log p_\theta(\mathcal D) &= \log \sum_{i=0}^N p_\theta ((o,a)_i) \\ &= \log \sum_{i=0}^N \int_{\text{supp}({Z})} p_\theta((o,a)_i \vert z) p(z) \\ &= \log \sum_{i=0}^N \int_{\text{supp}({Z})} \frac{q_\theta(z \vert (o,a)_i)}{q_\theta(z \vert (o,a)_i)} \cdot p_\theta((o,a)_i \vert z) p(z) \\ &= \log \sum_{i=0}^N \mathbb E_{z \sim p_\theta(\bullet \vert (o,a)_i)} [\frac{p(z)}{q_\theta(z \vert (o,a)_i)} \cdot p_\theta((o,a)_i \vert z)], \end{align}} $ ``` ### Code Use inline code with backticks \`...\` or \`\`\` fenced code blocks \`\`\` with a language for syntax highlighting (e.g., \`python\`). As an example, here is inline code: `greet("Astro")` and below is a block. ```python def greet(name: str) -> None: print(f"Hello, {name}!") ``` ````mdx `greet("Astro")` ```python def greet(name: str) -> None: print(f"Hello, {name}!") ``` ```` ### Code output If you want to display the output of a code block, you can use the `:::output` directive. If it's directly below the code block, it will adapt to the code block's styling. ```python def greet(name: str) -> None: print(f"Hello, {name}!") greet("Astro") ``` :::output Hello, Astro! ::: Or it can also be used at a standalone block. :::output Hello i'm a standalone output block. ::: ```python print("This script prints a very very long line to check overflow behavior.") ``` :::output This script prints a very very long line to check overflow behavior. ::: ````mdx ```python def greet(name: str) -> None: print(f"Hello, {name}!") greet("Astro") ``` :::output Hello, Astro! ::: Or you can also use it at a standalone block. :::output Hello i'm a standalone outputs block. ::: ```` ### Citation The **citation keys** come from `app/src/content/bibliography.bib`. **Citation** use the `@` syntax (e.g., `[@vaswani2017attention]` or `@vaswani2017attention` in narrative form) and are **automatically** collected to render the **bibliography** at the end of the article. 1) In-text citation with brackets: [@vaswani2017attention]. 2) Narrative citation: As shown by @kingma2015adam, stochastic optimization is widely used. 3) Multiple citations and a footnote together: see [@mckinney2017python; @he2016resnet] for related work. 4) All citations in one group: [@vaswani2017attention; @mckinney2017python; @he2016resnet; @silver2017mastering; @openai2023gpt4; @doe2020thesis; @cover2006entropy; @zenodo2021dataset; @sklearn2024; @smith2024privacy; @kingma2015adam; @raffel2020t5]. ```mdx 1) In-text citation with brackets: [@vaswani2017attention]. 2) Narrative citation: As shown by @kingma2015adam, stochastic optimization is widely used. 3) Multiple citations and a footnote together: see [@mckinney2017python; @he2016resnet] for related work. 4) All citations in one group: [@vaswani2017attention; @mckinney2017python; @he2016resnet; @silver2017mastering; @openai2023gpt4; @doe2020thesis; @cover2006entropy; @zenodo2021dataset; @sklearn2024; @smith2024privacy; @kingma2015adam; @raffel2020t5]. ``` > You can change the citation style in the `astro.config.mjs` file. There are several styles available: `apa`, `vancouver`, `harvard1`, `chicago`, `mla`. Default is `apa`. ### Footnote **Footnote** use an identifier like `[^f1]` and a definition anywhere in the document, e.g., `[^f1]: Your explanation`. They are **numbered** and **listed automatically** at the end of the article. 1) Footnote attached to the sentence above[^f1]. [^f1]: Footnote attached to the sentence above. 2) Multi-paragraph footnote example[^f2]. [^f2]: Multi-paragraph footnote. First paragraph. Second paragraph with a link to [Astro](https://astro.build). 2) Footnote containing a list[^f3]. [^f3]: Footnote with a list: - First item - Second item 3) Footnote with an inline code and an indented code block[^f4]. [^f4]: Footnote with code snippet: ```ts function add(a: number, b: number) { return a + b; } ``` Result: `add(2, 3) === 5`. 4) Footnote that includes citation inside[^f5] and another footnote[^f1]. [^f5]: Footnote containing citation [@vaswani2017attention] and [@kingma2015adam]. 5) Footnote with mathematical expressions[^f6]. [^f6]: This footnote includes inline math $E = mc^2$ and a display equation: $ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} $ This is the Gaussian integral, a fundamental result in probability theory. ```mdx 1) Footnote attached to the sentence above[^f1]. 2) Multi-paragraph footnote example[^f2]. 2) Footnote containing a list[^f3]. 3) Footnote with an inline code and an indented code block[^f4]. 4) Footnote that includes citation inside[^f5]. 5) Footnote with mathematical expressions[^f6]. [^f1]: Footnote attached to the sentence above. [^f2]: Multi-paragraph footnote. First paragraph. Second paragraph with a link to [Astro](https://astro.build). [^f3]: Footnote with a list: - First item - Second item [^f4]: Footnote with code snippet: function add(a: number, b: number) { return a + b; } Result: `add(2, 3) === 5`. [^f5]: Footnote containing citation [@vaswani2017attention] and [@kingma2015adam]. [^f6]: This footnote includes inline math $E = mc^2$ and a display equation: $ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} $ This is the Gaussian integral, a fundamental result in probability theory. ``` ### Referencing In research articles, you may have to make references to anything. They are basically html anchors. They can be used internally in the article or externally in other articles. 1. **Title** Each title is automatically generated with a slugged version from the citation key. ( slugged title from the citation key ) like for example, the id `#mermaid-diagrams` is generated from the `Mermaid diagrams` title. **Example** [Mermaid diagrams](#mermaid-diagram) 2. **Image and chart** You can make a link to an image or a chart by adding an ID on it. `` then you can link to it with a link like `[Fig 1](#neural-network-mnist-like)`. **Example** [Chart 1](#neural-network-mnist-like) or [Fig 1](#placeholder-image) > **Available with:** `Reference`, `Image`, and `HtmlEmbed` components all support the `id` prop for creating referenceable anchors. ```mdx #### Mermaid diagrams [Mermaid diagrams](#mermaid-diagrams) [Chart 1](#neural-network-mnist-like) [Fig 1](#placeholder-image) ``` ### Mermaid diagram Native mermaid diagrams are supported (use a \`\`\`mermaid\`\`\` code fence). You can use the live editor to create your diagram and copy the code to your article. ```mermaid erDiagram DATASET ||--o{ SAMPLE : contains RUN }o--o{ SAMPLE : uses RUN ||--|| MODEL : trains RUN ||--o{ METRIC : logs DATASET { string id string name } SAMPLE { string id string uri } MODEL { string id string framework } RUN { string id date startedAt } METRIC { string name float value } ``` ````mdx ```mermaid erDiagram DATASET ||--o{ SAMPLE : contains RUN }o--o{ SAMPLE : uses RUN ||--|| MODEL : trains RUN ||--o{ METRIC : logs DATASET { string id string name } SAMPLE { string id string uri } MODEL { string id string framework } RUN { string id date startedAt } METRIC { string name float value } ``` ```` ### Separator Use `---` on its own line to insert a horizontal separator between sections. This is a standard Markdown “thematic break”. Don’t confuse it with the `---` used at the very top of the file to delimit the frontmatter. --- ```mdx Intro paragraph. --- Next section begins here. ``` ### Table Use pipe tables like `| Column |` with header separator `| --- |`. You can control alignment with `:---` (left), `:---:` (center), and `---:` (right). | Model | Accuracy | F1-Score | Training Time | Status | |:---|:---:|:---:|---:|:---:| | **BERT-base** | 0.89 | 0.89 | 2.5h | ✅ | | **RoBERTa-large** | 0.92 | 0.92 | 4.2h | ✅ | | **DeBERTa-v3** | 0.94 | 0.94 | 5.8h | ✅ | | **GPT-3.5-turbo** | 0.91 | 0.91 | 0.1h | ✅ | ```mdx | Model | Accuracy | F1-Score | Training Time | Status | |:---|:---:|:---:|---:|:---:| | **BERT-base** | 0.89 | 0.89 | 2.5h | ✅ | | **RoBERTa-large** | 0.92 | 0.92 | 4.2h | ✅ | | **DeBERTa-v3** | 0.94 | 0.94 | 5.8h | ✅ | | **GPT-3.5-turbo** | 0.91 | 0.91 | 0.1h | ✅ | ``` ### Audio Embed audio using ``. ```mdx ``` ## Components **All** the following **components** are available in the **article.mdx** file. You can also create your own **components** by creating a new file in the `/components` folder. ### How to import components To use any component in your MDX file, add the import statement at the top: ```mdx # Your content > This is a note ``` Here are the components that are available: [ Image Optimized images ](#image) [ Placement Layout helpers ](#placement) [ Accordion Collapsible content ](#accordion) [ Note Contextual callouts ](#note) [ Quote Elegant citations ](#quote) [ HtmlEmbed External content ](#htmlembed) [ Reference Flexible content wrapper ](#reference) [ Iframe Web embeds ](#iframe) [ Glossary Interactive term definitions ](#glossary) [ Stack Flexible grid layouts ](#stack) ### Image **Images** automatically generate optimized `srcset` and `sizes` so the browser downloads the most appropriate file for the current viewport and DPR. You can also request multiple output formats (e.g., **AVIF**, **WebP**, fallback **PNG/JPEG**) and control **lazy loading/decoding** for better **performance**. RCA Indian Head Test Pattern'} /> | Prop | Required | Description |------------------------|----------|------------------------------------------------------- | `zoomable` | No | Adds a zoomable lightbox (Medium-like). | `downloadable` | No | Adds a download button to fetch the image file. | `loading="lazy"` | No | Lazy loads the image. | `caption` | No | Adds a caption and credit. | `id` | No | Adds an `id` to the outer figure for deep-linking and cross-references. ```mdx Credit: Photo by [Author](https://example.com)'} /> ``` ### Placement Use these helpers when you need to step outside the main content flow: **Sidenotes** for contextual side notes, **Wide** to extend beyond the main column, and **Full-width** for full-width, immersive sections. #### Sidenotes This paragraph presents a **key idea** concisely. **Side note** for brief context or a definition. This paragraph discusses the relationship between variables in a mathematical context, where we consider the function $f(x) = x^2 + 2x + 1$. The derivative $f'(x) = 2x + 2$ can be found using the power rule. When $f'(x) = 0$, we get the critical point: $ 2x + 2 = 0 \implies x = -1 $ This critical point corresponds to a minimum since $f''(x) = 2 > 0$. ```mdx Main paragraph with the core idea. Short side note. Paragraph with math context using $f(x) = x^2 + 2x + 1$. The derivative $f'(x) = 2x + 2$. When $f'(x) = 0$: $ 2x + 2 = 0 \implies x = -1 $ This is a minimum since $f''(x) = 2 > 0$. ``` #### Wide example demo wide ```mdx Your content here... ``` #### Full-width example demo full-width ```mdx Your content here... ``` ### Reference The **Reference** component provides a flexible wrapper for any content with an ID and HTML caption. It's perfect for creating **numbered references**, **cross-references**, or **any content that needs to be referenced** throughout your article. > **Note:** The `Image` and `HtmlEmbed` components also support the same `id` and `caption` props for consistent referencing across your article. styling"> you content here... | Prop | Required | Type | Description | |----------|----------|--------|--------------------------------| | `id` | Yes | string | Unique identifier for the reference (used for deep-linking) | | `caption`| Yes | string | HTML caption displayed below the content (supports HTML tags) | ```mdx flexible content wrapper"> Any content can go here... Even complex HTML structures! source link"> Column 1Column 2 Data 1Data 2 ``` **Use cases:** - **Numbered figures** with custom content - **Cross-references** that can be linked to from anywhere in the article - **Flexible content blocks** that need consistent styling and captioning - **Tables, charts, or any content** that requires an ID and description ### Accordion Can be used like this `some content`. You can pass any children content. The accordion component provides a collapsible content area that helps organize information efficiently. It's perfect for creating expandable sections, FAQ entries, or any content that benefits from progressive disclosure. Users can click the title to toggle the visibility of the content inside. | Prop | Required | Description |-------------|----------|---------------------------------------------------------------------------------- | `src` | Yes | Path to the embed file in the `embeds` folder. | `title` | No | Short title displayed above the card. | `desc` | No | Short description displayed below the card. Supports inline HTML (e.g., links). | `frameless` | No | Removes the card background and border for seamless embeds. | `align` | No | Aligns the title/description text. One of `left` (default), `center`, `right`. | `id` | No | Adds an `id` to the outer figure for deep-linking and cross-references. ````mdx Free content with markdown and MDX components. | Prop | Required | Description |-------------|----------|---------------------------------------------------------------------------------- | `src` | Yes | Path to the embed file in the `embeds` folder. | `title` | No | Short title displayed above the card. | `desc` | No | Short description displayed below the card. Supports inline HTML (e.g., links). | `frameless` | No | Removes the card background and border for seamless embeds. | `align` | No | Aligns the title/description text. One of `left` (default), `center`, `right`. | `id` | No | Adds an `id` to the outer figure for deep-linking and cross-references. ```ts function greet(name: string) { console.log(`Hello, ${name}`); } greet("Astro"); ``` ```` ### Note Small contextual callout for tips, caveats, or emphasis. > Use notes to surface context without breaking reading flow. > Operation completed successfully. > Be careful: this action cannot be undone. > Plain note without header. Useful for short clarifications. | Prop | Required | Type | Description | |----------|----------|------------------------------|-------------------------------------| | `title` | No | string | Short title displayed in header | | `emoji` | No | string | Emoji displayed before the title | | `class` | No | string | Extra classes for custom styling | | `variant`| No | 'neutral' | 'info' | 'success' | 'danger' | Visual intent of the note | ```mdx > Use notes to surface context without breaking reading flow. > Operation completed successfully. > Be careful: this action cannot be undone. > Plain note without header. Useful for short clarifications. ``` ### Quote Elegant quotes with optional source attribution. Learning representations by back-propagating errors"> Backpropagation allows neural networks to discover their own internal representations of data. | Prop | Required | Type | Description | |----------|----------|--------|--------------------------------| | `source` | No | HTML | Quote source/author (supports HTML links) | ```mdx Learning representations by back-propagating errors"> Backpropagation allows neural networks to discover their own internal representations of data. ``` ### Glossary The **Glossary** component creates interactive term definitions with hover tooltips. Perfect for **technical terms**, **acronyms**, and **concepts** that need explanation without breaking the reading flow. | Prop | Required | Type | Description |-------------------|----------|-----------------------------------------|------------------------------------------------------- | `term` | Yes | `string` | The word or term to define | `definition` | Yes | `string` | The definition of the term | `class` | No | `string` | Optional CSS class to apply to the term | `style` | No | `string` | Optional inline style to apply to the term | `position` | No | `'top' \| 'bottom' \| 'left' \| 'right'` | Tooltip position (default: 'top') | `delay` | No | `number` | Delay before showing tooltip in ms (default: 300) | `disableOnMobile` | No | `boolean` | Disable tooltip on mobile devices (default: false) ```mdx ``` **Use cases:** - **Technical terms** that need explanation - **Acronyms** and abbreviations - **Domain-specific concepts** for broader audiences - **Interactive glossaries** for educational content ### Stack The **Stack** component provides flexible grid layouts for organizing content. Perfect for **comparisons**, **side-by-side examples**, **multi-column layouts**, and **responsive content organization**. Auto Layout This layout automatically adjusts based on content and available space. Responsive Items will wrap to new lines as needed, with a minimum width of 300px. Flexible Perfect for varying content lengths and dynamic layouts. | Prop | Required | Type | Description |----------|----------|-----------------------------------------------------------------------|------------------------------------------------------- | `layout` | No | `"2-column" \| "3-column" \| "4-column" \| "auto"` | Grid layout for the content (default: "2-column") | `gap` | No | `"small" \| "medium" \| "large" \| string` | Gap between items - predefined size or custom value (e.g., "2rem", "20px") | `class` | No | `string` | Optional CSS class to apply to the wrapper | `id` | No | `string` | Optional ID for the stack ```mdx Auto Layout This layout automatically adjusts based on content and available space. Responsive Items will wrap to new lines as needed, with a minimum width of 300px. Flexible Perfect for varying content lengths and dynamic layouts. ``` ### Iframes You can embed external content in your article using **iframes**. For example, **Gradio** or even **Github code embeds** can be used this way. Gradio embed example ```mdx ``` ### HtmlEmbed The main purpose of the ```HtmlEmbed``` component is to **embed** a **Plotly** or **D3.js** chart in your article. **Libraries** are already imported in the template. They exist in the `app/src/content/embeds` folder. For researchers who want to stay in **Python** while targeting **D3**, the [d3blocks](https://github.com/d3blocks/d3blocks) library lets you create interactive D3 charts with only a few lines of code. In **2025**, **D3** often provides more flexibility and a more web‑native rendering than **Plotly** for custom visualizations. *[Interactive visualization: smol-playbook/generic-d3-line-chart.html]*Credit: Example" /> | Prop | Required | Description |-------------|----------|---------------------------------------------------------------------------------- | `src` | Yes | Path to the embed file in the `embeds` folder. | `title` | No | Short title displayed above the card. | `desc` | No | Short description displayed below the card. Supports inline HTML (e.g., links). | `frameless` | No | Removes the card background and border for seamless embeds. | `align` | No | Aligns the title/description text. One of `left` (default), `center`, `right`. | `id` | No | Adds an `id` to the outer figure for deep-linking and cross-references. | `data` | No | Path (string) or array of paths (string[]) to data file(s) consumed by the embed. | `config` | No | Optional object for embed options (e.g., `{ defaultMetric: 'average_rank' }`). ```mdx *[Interactive visualization: smol-playbook/generic-d3-line-chart.html]*Credit: Example" /> *[Interactive visualization: smol-playbook/generic-d3-line-chart.html]* ``` #### Data If you need to link your **HTML embeds** to **data files**, there is an **`assets/data`** folder for this. As long as your files are there, they will be served from the **`public/data`** folder. You can fetch them with this address: **`[domain]/data/your-data.ext`** > Be careful, unlike images, data files are not optimized by Astro. You need to optimize them manually. --- ### Dataviz page The template includes a dedicated **`/dataviz`** page that automatically collects and displays **all visual assets** from your article in one place. It's useful for reviewing your figures, exporting them, or sharing a visual summary of your paper. **What it extracts:** | Type | Source | Details | |------|--------|---------| | **Charts** | `` components | Rendered live with all props (config, data, wide) | | **Images** | `` components | Resolved from MDX imports to actual files | | **Stacks** | `` containing `` | Grouped as a single item, preserving layout | | **Tables** | Markdown tables (`\| ... \|`) | Parsed with headers and rows | The page is accessible at **`/dataviz`** ([see it live](https://tfrere-research-article-template.hf.space/dataviz)) and displays each item with: - A **type badge** (Chart, Image, Stack, Table) - A sequential **number** (#1, #2, ...) - The **title** or caption when available - A **"View in article"** link back to the source **Excluding items from the gallery:** Add the `skipGallery` prop to any `` or `` you don't want on the dataviz page. For `` components, if **all** images inside have `skipGallery`, the entire stack is excluded. ```mdx *[Interactive visualization: internal-debug.html]* ``` **Downloading charts:** Each chart on the dataviz page has a **download button** (PNG export). You can also batch-export all charts as a ZIP by running this in the browser console: ```js window.exportAllEmbeds() ``` ## Vibe coding charts > This is a work in progress. It may change quickly. ### Prompt This page explains how to use the directives to author D3 charts as self‑contained HTML fragments. Using claude code works better. The goal is to make **responsive**, **accessible**, **interactive** and **dark mode ready** charts. 1. Two agent skills ship with the template (Cursor picks them up from `.cursor/skills/`, other agents from `.ai/skills/`): `create-html-embed` for the embed runtime and contract, `design-dataviz` for chart design. Run `npm run check:embed -- your-chart.html` to verify a chart in light, dark and narrow layouts. 2. Opt: use an already existing chart as a starting point. 3. Ask claude to code the chart. Here's a typical prompt: ```markdown I want you to code a new d3 chart named `yourchart`. I have one CSV file called `yourdata.csv` in the data folder. The csv has the following columns: `x`, `y`, `z`. I want you to code a d3 chart that visualizes the data. ``` 4. Once the chart created, iterate with littles adjustments to make it better. 5. And that's it! 🎉 ### Base examples These are fundamental chart types that serve as building blocks for more complex visualizations. You can find all the source code in `app/src/content/embeds`. --- ### Advanced examples These are more complex, interactive visualizations that demonstrate advanced D3 capabilities and real-world applications. --- --- Recent arXiv publications (~8k papers from last month) via TF-IDF embeddings projected to 2D via UMAP. --- Google Fonts clustered by visual similarity via UMAP. Each point represents a typeface positioned based on pixel-level differences computed from font matrices.`} frameless align="center" /> --- --- --- --- --- --- --- --- --- equation editor with real-time function plotting. Edit mathematical expressions and see their graphs update instantly. Supports common functions (sin, cos, exp, etc.) with customizable domain range.`} /> ## Import from LaTeX > ⚠️ **Experimental** — May not work with all LaTeX documents. Transform LaTeX papers into interactive web articles. ### Quick Start ```bash cd app/scripts/latex-importer/ cp your-paper.tex input/main.tex cp your-paper.bib input/main.bib node index.mjs ``` ### What Gets Converted - `\label{eq:name}` → Interactive equations - `\ref{eq:name}` → Clickable links - `\includegraphics{}` → `` components - Bibliography integration ### Prerequisites - **Pandoc** (`brew install pandoc`) - LaTeX source files and figures ### Docker Deployment Set `ENABLE_LATEX_CONVERSION=true` in your Hugging Face Space to enable automatic conversion during build. ## Import from Notion > ⚠️ **Experimental** — May not work with all Notion pages. Convert Notion pages into interactive web articles. ### Prerequisites You need **2 things**: 1. **NOTION_TOKEN** — Your Notion integration token - Go to [notion.so/my-integrations](https://www.notion.so/my-integrations) - Create a new integration → copy the token (starts with `secret_` or `ntn_`) 2. **NOTION_PAGE_ID** — The ID of your Notion page - Open your page in browser: `https://www.notion.so/My-Page-abc123def456` - The ID is the last part after the title: `abc123def456` ### Share Your Page with the Integration > **This step is required!** Having a token is not enough — you must explicitly share the page with your integration. 1. Open your Notion page 2. Click **"..."** (top right corner) 3. Click **"Connections"** or **"Add connections"** 4. Select your integration from the list 5. Confirm access If your page is nested inside another page or database, you can either share the parent page (the integration will have access to all sub-pages) or share each page individually. ### Option A: Automatic on HF Space Add these to your Space settings (Settings → Variables and secrets): | Type | Name | Value | |------|------|-------| | Secret | `NOTION_TOKEN` | your token | | Variable | `NOTION_PAGE_ID` | your page ID | | Variable | `ENABLE_NOTION_CONVERSION` | `true` | Then restart the Space. Every rebuild will fetch the latest Notion content automatically. ### Option B: Local Development ```bash cd app/scripts/notion-importer/ npm install cp env.example .env # Edit .env with NOTION_TOKEN and NOTION_PAGE_ID npm run notion:import # or: node index.mjs ``` This rewrites `src/content/article.mdx` with your Notion content. Push to deploy. ### What Gets Converted - Images (downloaded locally) - Callouts → `` components - Enhanced tables and code blocks - Smart link conversion ## Writing Tips Simple guidelines to make your research writing clear, engaging, and effective. Focus on what matters most: helping readers understand your ideas quickly and completely. ### Short sections Break content into **small, purpose‑driven sections**. Each section should answer a **single question** or support one idea. This improves **scanability**, helps readers navigate with the TOC, and makes later edits safer. ### Clear, minimal annotations Favor **concise captions** and callouts that clarify what to look at and why it matters. In code, **highlight just the lines** that carry the idea; avoid verbose commentary. **Precision beats volume**. ### Explain math notation **Introduce symbols and variables** the first time they appear, and prefer **well‑known identities** over custom shorthand. When formulas carry the message, add one sentence of **plain‑language interpretation** right after. > For example, in linear regression with features $x \in \mathbb{R}^d$, weights $w \in \mathbb{R}^d$, and bias $b$, the prediction is: $ \hat{y} = w^\top x + b $ A common training objective is the mean squared error over $N$ samples: $ \mathcal{L}(w,b) = \frac{1}{N} \sum_{i=1}^{N} (w^\top x_i + b - y_i)^2 $ Interpretation: the model fits a hyperplane that minimizes the average squared prediction error. ### Use the right chart Picking the right visualization depends on your goal (compare values, show distribution, part-to-whole, trends, relationships, etc.). The Visual Vocabulary poster below provides a concise mapping from **analytical task** to **chart types**. ## Greetings Huge thanks to the following people for their **precious feedbacks**!