Date: 2025-02-23
Status
Accepted
Context
We need to establish a clear workflow for converting book content from source format to multiple output formats. Key considerations:
- Source format must be author-friendly
- Need to support multiple output formats (PDF, EPUB, MOBI)
- Must handle complex formatting and metadata
- Require reliable conversion tools
- Need consistent quality across outputs
Decision
We will implement the following workflow:
-
Input Format Selection
- Markdown as primary source format
- YAML for metadata management
- Asset organization in standardized directory structure
-
Intermediate Processing
- Pandoc as primary conversion engine
- LaTeX as intermediate format for PDF output
- Custom templates for consistent styling
- Automated metadata injection
-
Output Generation
- PDF via LaTeX/XeLaTeX
- EPUB 3.0 via Pandoc
- MOBI via Calibre conversion
- HTML for web preview
-
Tool Selection
- Pandoc for initial conversion
- TeX Live for PDF generation
- Calibre for final ebook formats
- Kindle Previewer for validation
Consequences
Positive
- Markdown source is easy to write and maintain
- Pandoc provides flexible conversion options
- LaTeX gives high-quality PDF output
- Multiple output formats from single source
- Automated workflow reduces errors
Negative
- Complex tool chain to maintain
- LaTeX learning curve for custom formatting
- Need to manage multiple conversion steps
- Platform-specific tools required (especially for Kindle)
- Must validate output across formats