pandoc_docx_template  by Achuan-2

Customizable Pandoc Markdown to DOCX conversion templates

Created 2 years ago
790 stars

Top 44.0% on SourcePulse

GitHubView on GitHub
Project Summary

<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> This repository provides a customizable Pandoc Word template (.docx) to enhance Markdown-to-Word exports, addressing the often unappealing default styling. It targets users of note-taking apps (Obsidian, Typora, SiYuan) needing professional, Chinese-typographically-aware document formatting. The solution offers fine-grained control over text, numbering, lists, and more, improving export aesthetics and standardization.

How It Works

It leverages Pandoc's --reference-doc feature with a custom .docx template. Crucially, it integrates Lua filters to extend Pandoc's capabilities for DOCX conversion. These filters enable correct handling of Markdown features poorly supported in DOCX, such as embedded HTML tags, using image title for captions, preserving font colors, and applying distinct styles to code blocks versus inline code.

Quick Start & Requirements

  • Usage: Apply via Pandoc command: pandoc input.md --reference-doc <path/to/template.docx> -o output.docx. Integration guides for Typora, SiYuan, and Obsidian (via plugins) are provided.
  • Prerequisites: Pandoc, Microsoft Office Word (Windows recommended).
  • Links: Detailed Pandoc usage and feature documentation is available via linked blog posts within the README.

Highlighted Details

  • Configurable heading numbering and list indentation.
  • Custom styling for blockquotes (e.g., figure captions) and line numbers.
  • Preservation of inline font color styling from Markdown/HTML.
  • Advanced image handling: using title for captions, custom numbering.
  • Distinct styling for code blocks and inline code elements.

Maintenance & Community

This project appears to be a personal effort by "Achuan-2," with no explicit mention of a wider community, contributors, sponsorships, or a formal roadmap.

Licensing & Compatibility

  • License: No formal open-source license is specified; described as "powered by love/donation."
  • Compatibility: Primarily tested on Windows Office Word. Potential issues exist with WPS and Mac Office versions. The lack of a formal license may restrict commercial adoption.

Limitations & Caveats

The primary limitation is the strong Windows Office Word dependency; WPS and Mac Office users may encounter formatting inconsistencies. Reliance on Lua filters adds workflow complexity. The absence of a defined license could be a barrier for commercial adoption or derivative works.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
110 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), and
1 more.

rlhf-book by natolambert

0.4%
2k
Pandoc template for generating technical books
Created 2 years ago
Updated 1 day ago
Starred by Travis Fischer Travis Fischer(Founder of Agentic), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
2 more.

MinerU by opendatalab

1.2%
65k
PDF extraction tool for converting PDFs to Markdown and JSON
Created 2 years ago
Updated 1 day ago
Starred by Tom Preston-Werner Tom Preston-Werner(Cofounder of GitHub), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
21 more.

markitdown by microsoft

1.0%
125k
Python tool for converting files to Markdown for LLM text analysis
Created 1 year ago
Updated 5 days ago
Feedback? Help us improve.