Creating Cookbooks
Transform your digital recipe collection into a professional cookbook that you can print, share, or publish. This guide shows you how to use CookCLI's LaTeX export feature (supported in version after 0.18.0) to create PDF cookbooks from your Cooklang recipes.
🎯 What You'll Create
By the end of this tutorial, you'll have:
- A professionally formatted PDF cookbook
- Organized chapters by meal type
- Color-coded ingredients and equipment
- Automatic table of contents and index
- Print-ready or digital ebook format
📋 Prerequisites
Before starting, make sure you have:
- CookCLI installed (Installation guide)
- LaTeX distribution installed:
- Your recipes in
.cook
format organised in folders (that will become book chapters later)
🚀 Quick Start: Your First Cookbook in 5 Minutes
Step 1: Get the Cookbook Tools
Step 2: Generate Your Cookbook
Step 3: Compile to PDF
📖 Step-by-Step Walkthrough
1️⃣ Organize Your Recipes
Structure your recipes in folders by category:
The folder names become chapter titles in your cookbook!
2️⃣ Generate Your Cookbook
Using the Python Script (Recommended)
Script Options
Manual Generation
For individual recipes, you can use CookCLI directly:
3️⃣ Customize Your Cookbook
Edit the generated .tex
file to customize:
4️⃣ Add Special Sections
🛠️ Advanced Features
Including Recipe Images
The script automatically finds and includes images that match your recipe names:
Supported image formats: PNG, JPG, JPEG
Creating Multiple Versions
Customizing Colors
Edit the generated LaTeX file to change ingredient, cookware, and timer colors:
Scaling Recipes
Download Sample Cookbook
Download a sample PDF cookbook to see what you can create!
💡 Pro Tips
1. Recipe Metadata
The script extracts metadata from recipe comments. Add metadata to your .cook
files:
2. Organizing by Chapters
The script automatically creates chapters based on your directory structure:
3. Recipe Index
The script automatically generates:
- Recipe index by name
- Index by tags (if metadata includes tags)
- Index by author (if metadata includes author)
4. Version Control
Keep your recipes and cookbook under version control:
🚧 Troubleshooting
Common Issues and Solutions
Problem | Solution |
---|---|
"LaTeX command not found" | Install TeX distribution for your OS |
"Package not found" error | Run tlmgr install enumitem multicol xcolor titlesec geometry hyperref makeidx imakeidx fancyhdr |
"cook command not found" | Install CookCLI or use cargo run if building from source |
Missing colors in PDF | Ensure xcolor package is included |
Index not generated | Run makeindex between compilations |
Recipes not found | Check file extensions are .cook |
Images not showing | Ensure image files match recipe names (e.g., pasta.cook → pasta.jpg ) |
📚 Resources
🎉 Share Your Creation
Created a beautiful cookbook? We'd love to see it!
- Share on social media with #CooklangCookbook
- Post in our community forum
- Submit your template to the cookbook-sample repository
Ready to create your cookbook? Get started with the cookbook-creator toolkit →
Transform your recipes into a beautiful cookbook today with CookCLI!