HuggingFaceTB/trl-distillation-trainer

Space

Research Article Template

93

44 commits

1 linked in READMEs

updated Apr 14, 2026

See the code

README

Research Article Template

A modern, interactive template for scientific writing that brings papers to life.

Interactive diagrams, math, citations, dark mode, PDF export - all with minimal setup.

Live demo & docs | License: CC BY 4.0 Hugging Face Spaces

Quick start

npx create-research-article my-paper

The CLI walks you through setup interactively:

  • Project name and basic metadata (title, authors, affiliations)
  • Template choice: paper (formal, with banner, TOC, citations, figure numbering) or article (lighter centered layout, no banner, no figure numbering)
  • Hugging Face deployment (optional, auto-creates a Space if huggingface-cli is installed)

Then start writing:

cd my-paper/app
npm run dev              # dev server at localhost:4321

Deploy to Hugging Face

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.

Template variants

Set template in app/src/content/article.mdx frontmatter:

ValueLayoutBest for
paper (default)Banner, sidebar TOC, figure numbering, citation block, PDF exportFormal research papers
articleCentered single column, no banner, no figure numbering, minimal footerBlog posts, lighter articles

Edit your content

FileWhat
app/src/content/article.mdxMain article (metadata + chapter imports)
app/src/content/chapters/Chapters (one .mdx per section)
app/src/content/bibliography.bibBibTeX references
app/src/content/embeds/D3.js HTML visualizations
app/src/content/assets/image/Images
app/src/content/assets/data/CSV/JSON data files

Commands

CommandWhat
npm run devDev server
npm run buildProduction build
npm run export:pdfExport as PDF
npm run export:latexExport as LaTeX
npm run sync:templatePull latest template updates

Alternative setup

Duplicate on Hugging Face
  1. Visit Research Article Template, click "Duplicate this Space"
  2. Clone: git clone git@hf.co:spaces/<your-username>/<your-space>
  3. cd <your-space>/app && git lfs pull && npm install && npm run dev
Clone directly
git 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

License

CC-BY-4.0 - Distill-inspired, built with Astro + MDX + D3.js.

Discussions | @tfrere

data visualization
docker
research-article-template
research paper
scientific paper

Contributors

tfrere

25 commits

cmpatino

12 commits

CU
Cursor

7 commits

HuggingFaceTB/trl-distillation-trainer

Space

Research Article Template

93

44 commits

1 linked in READMEs

updated Apr 14, 2026

See the code

README

Research Article Template

A modern, interactive template for scientific writing that brings papers to life.

Interactive diagrams, math, citations, dark mode, PDF export - all with minimal setup.

Live demo & docs | License: CC BY 4.0 Hugging Face Spaces

Quick start

npx create-research-article my-paper

The CLI walks you through setup interactively:

  • Project name and basic metadata (title, authors, affiliations)
  • Template choice: paper (formal, with banner, TOC, citations, figure numbering) or article (lighter centered layout, no banner, no figure numbering)
  • Hugging Face deployment (optional, auto-creates a Space if huggingface-cli is installed)

Then start writing:

cd my-paper/app
npm run dev              # dev server at localhost:4321

Deploy to Hugging Face

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.

Template variants

Set template in app/src/content/article.mdx frontmatter:

ValueLayoutBest for
paper (default)Banner, sidebar TOC, figure numbering, citation block, PDF exportFormal research papers
articleCentered single column, no banner, no figure numbering, minimal footerBlog posts, lighter articles

Edit your content

FileWhat
app/src/content/article.mdxMain article (metadata + chapter imports)
app/src/content/chapters/Chapters (one .mdx per section)
app/src/content/bibliography.bibBibTeX references
app/src/content/embeds/D3.js HTML visualizations
app/src/content/assets/image/Images
app/src/content/assets/data/CSV/JSON data files

Commands

CommandWhat
npm run devDev server
npm run buildProduction build
npm run export:pdfExport as PDF
npm run export:latexExport as LaTeX
npm run sync:templatePull latest template updates

Alternative setup

Duplicate on Hugging Face
  1. Visit Research Article Template, click "Duplicate this Space"
  2. Clone: git clone git@hf.co:spaces/<your-username>/<your-space>
  3. cd <your-space>/app && git lfs pull && npm install && npm run dev
Clone directly
git 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

License

CC-BY-4.0 - Distill-inspired, built with Astro + MDX + D3.js.

Discussions | @tfrere

data visualization
docker
research-article-template
research paper
scientific paper

Contributors

tfrere

25 commits

cmpatino

12 commits

CU
Cursor

7 commits