12
stars
12
commits
Apr 30, 2026
updated
A modern, interactive template for scientific writing that brings papers to life.
Interactive diagrams, math, citations, dark mode, PDF export - all with minimal setup.
npx create-research-article my-paper
The CLI walks you through setup interactively:
article (full layout with banner, TOC, citations, figure numbering, PDF export) or paper (lighter centered single-column layout)huggingface-cli is installed)Then start writing:
cd my-paper/app
npm run dev # dev server at localhost:4321
If you skipped the auto-deploy during setup, push manually:
# create a Docker Space at huggingface.co/new-space, then:
git remote add space git@hf.co:spaces/<your-username>/<your-space>
git push space main
The project ships with Dockerfile, nginx config, and HF Space metadata ready to go.
Set template in app/src/content/article.mdx frontmatter:
| Value | Layout | Best for |
|---|---|---|
article (default) | Banner, sidebar TOC, figure numbering, citation block, PDF export | Full research articles |
paper | Centered single column, no figure numbering, minimal footer | Blog posts, lighter papers |
The paper template supports external link buttons below the authors:
links:
- label: "Paper"
url: "https://arxiv.org/abs/..."
- label: "Code"
url: "https://github.com/..."
- label: "Demo"
url: "https://huggingface.co/spaces/..."
Long titles are automatically balanced across lines. You can also force a line break with \n:
title: "Why Open-Source LLMs\nAre Reshaping the AI Landscape"
Titles longer than 60 characters are automatically downsized for readability.
| File | What |
|---|---|
app/src/content/article.mdx | Main article (metadata + chapter imports) |
app/src/content/chapters/ | Chapters (one .mdx per section) |
app/src/content/bibliography.bib | BibTeX references |
app/src/content/embeds/ | D3.js HTML visualizations |
app/src/content/assets/image/ | Images |
app/src/content/assets/data/ | CSV/JSON data files |
| Command | What |
|---|---|
npm run dev | Dev server |
npm run build | Production build |
npm run export:pdf | Export as PDF |
npm run export:latex | Export as LaTeX |
npm run sync:template | Pull latest template updates |
git clone git@hf.co:spaces/<your-username>/<your-space>cd <your-space>/app && git lfs pull && npm install && npm run devgit clone https://github.com/tfrere/research-article-template.git
cd research-article-template/app
git lfs install && git lfs pull
npm install && npm run dev
CC-BY-4.0 - Distill-inspired, built with Astro + MDX + D3.js.
12 commits
12
stars
12
commits
Apr 30, 2026
updated
A modern, interactive template for scientific writing that brings papers to life.
Interactive diagrams, math, citations, dark mode, PDF export - all with minimal setup.
npx create-research-article my-paper
The CLI walks you through setup interactively:
article (full layout with banner, TOC, citations, figure numbering, PDF export) or paper (lighter centered single-column layout)huggingface-cli is installed)Then start writing:
cd my-paper/app
npm run dev # dev server at localhost:4321
If you skipped the auto-deploy during setup, push manually:
# create a Docker Space at huggingface.co/new-space, then:
git remote add space git@hf.co:spaces/<your-username>/<your-space>
git push space main
The project ships with Dockerfile, nginx config, and HF Space metadata ready to go.
Set template in app/src/content/article.mdx frontmatter:
| Value | Layout | Best for |
|---|---|---|
article (default) | Banner, sidebar TOC, figure numbering, citation block, PDF export | Full research articles |
paper | Centered single column, no figure numbering, minimal footer | Blog posts, lighter papers |
The paper template supports external link buttons below the authors:
links:
- label: "Paper"
url: "https://arxiv.org/abs/..."
- label: "Code"
url: "https://github.com/..."
- label: "Demo"
url: "https://huggingface.co/spaces/..."
Long titles are automatically balanced across lines. You can also force a line break with \n:
title: "Why Open-Source LLMs\nAre Reshaping the AI Landscape"
Titles longer than 60 characters are automatically downsized for readability.
| File | What |
|---|---|
app/src/content/article.mdx | Main article (metadata + chapter imports) |
app/src/content/chapters/ | Chapters (one .mdx per section) |
app/src/content/bibliography.bib | BibTeX references |
app/src/content/embeds/ | D3.js HTML visualizations |
app/src/content/assets/image/ | Images |
app/src/content/assets/data/ | CSV/JSON data files |
| Command | What |
|---|---|
npm run dev | Dev server |
npm run build | Production build |
npm run export:pdf | Export as PDF |
npm run export:latex | Export as LaTeX |
npm run sync:template | Pull latest template updates |
git clone git@hf.co:spaces/<your-username>/<your-space>cd <your-space>/app && git lfs pull && npm install && npm run devgit clone https://github.com/tfrere/research-article-template.git
cd research-article-template/app
git lfs install && git lfs pull
npm install && npm run dev
CC-BY-4.0 - Distill-inspired, built with Astro + MDX + D3.js.
12 commits