Files
gh-cadrianmae-claude-market…/commands/restyle.md
2025-11-29 18:03:12 +08:00

2.4 KiB

description, argument-hint, allowed-tools, disable-model-invocation
description argument-hint allowed-tools disable-model-invocation
Transform document to match target template style <input> <target-style> Bash, Read, Write true

/pandoc:restyle - Restyle Document

Ask Claude to transform a document's frontmatter and structure to match a target template style.

Available Styles

  • academic-paper - Academic paper with citations
  • thesis - Thesis/report with title page
  • article - Simple article
  • presentation-beamer - PDF slides
  • presentation-reveal - Web slides

What It Does

  1. Reads current document and analyzes frontmatter
  2. Replaces frontmatter with target template style
  3. Preserves all markdown content
  4. Suggests structural improvements if needed

Quick Reference

OCR → Academic Paper:

# Before (OCR metadata)
---
title: "Document Title"
processed_date: "2025-11-15"
ocr_model: "model-name"
---

# After (Academic)
---
title: "Paper Title"
author: "Author Name"
date: "Month Year"
bibliography: references.bib
csl: harvard.csl
documentclass: report
fontsize: 12pt
geometry: margin=1in
numbersections: true
---

Simple → Thesis:

# Before
---
title: "Document"
author: "Name"
---

# After
---
title: "Thesis Title"
author: "Student Name"
supervisor: "Supervisor Name"
institution: "University Name"
department: "Department Name"
degree: "Degree Name"
bibliography: references.bib
csl: harvard.csl
documentclass: report
toc: true
lof: true
lot: true
---

Workflow

  1. Backup: cp document.md document.md.bak
  2. Ask Claude to restyle to target template
  3. Review frontmatter changes
  4. Edit custom fields (author, title, etc.)
  5. Validate: Check document is ready
  6. Convert: Generate output

Ask Claude

"Restyle this document to match the thesis template" "Transform this OCR output to academic paper format" "Convert this to presentation style" "Reformat this with proper academic frontmatter"

Common Transformations

Template from PDF/OCR:

  • Remove: source, processed_date, ocr_model, processor
  • Add: author, date, documentclass, geometry
  • Update: title to actual document title

Blog/Draft → Academic:

  • Add: bibliography, csl, documentclass
  • Add: fontsize, geometry, numbersections
  • Structure: Academic section organization

Article → Thesis:

  • Add: supervisor, institution, department, degree
  • Add: toc, lof, lot
  • Add: Abstract, Declaration, Acknowledgements sections