Transform your Cooklang recipes into beautiful PDF cookbooks with this comprehensive toolkit.
Download sample cookbook here.
- 🎨 Professional formatting with color-coded ingredients, cookware, and timers
- 📑 Automatic organization into chapters based on your folder structure
- 📇 Table of contents and index generated automatically
- 🛠️ Multiple generation methods: Python, Shell, Make, or manual
- 📖 Customizable templates from minimal to feature-rich
- 🖨️ Print-ready output or digital ebook format
- CookCLI installed
- LaTeX distribution (TeX Live, MiKTeX, or MacTeX)
- Python 3 (for automated generation)
# Clone this repository
git clone https://github.com/cooklang/cookbook-sample.git
cd cookbook-sample
# Generate cookbook from your recipes
python3 scripts/create_cookbook.py ~/my-recipes my-cookbook.tex \
--title "Family Recipes" --author "Your Name"
# Compile to PDF
pdflatex my-cookbook.tex
pdflatex my-cookbook.tex # Run twice for TOC
# View your cookbook
open my-cookbook.pdf # macOS
xdg-open my-cookbook.pdf # Linux
cookbook-creator/
├── README.md # This file
├── scripts/
│ ├── create_cookbook.py # Automated cookbook generator
├── examples/
│ └── my_cookbook.pdf # Example output
│ └── recipes/ # Example recipes
python3 scripts/create_cookbook.py recipes/ cookbook.tex \
--title "My Cookbook" \
--author "Jane Doe" \
--no-index # Optional: skip index generation
Edit the color definitions in your LaTeX file:
\definecolor{ingredientcolor}{RGB}{204, 85, 0} % Orange
\definecolor{cookwarecolor}{RGB}{34, 139, 34} % Green
\definecolor{timercolor}{RGB}{220, 20, 60} % Red
Modify page geometry:
\geometry{left=2.5cm,right=2.5cm,top=2.5cm,bottom=3cm,bindingoffset=0.5cm}
Add custom sections to templates:
- Introduction/Preface
- Conversion tables
- Kitchen tips
- Wine pairings
- Nutritional information
Generate recipes for different serving sizes:
cook recipe -f latex "Pasta:2" -o pasta_2.tex # 2 servings
cook recipe -f latex "Pasta:8" -o pasta_8.tex # 8 servings
\usepackage{graphicx}
\section{Chocolate Cake}
\includegraphics[width=0.5\textwidth]{images/cake.jpg}
\usepackage[english,spanish]{babel}
\selectlanguage{spanish}
\chapter{Recetas Españolas}
Problem | Solution |
---|---|
LaTeX not found | Install TeX distribution for your OS |
Missing packages | Run tlmgr install [package] |
Recipes not found | Ensure files have .cook extension |
Index not generated | Run makeindex between compilations |
Compilation errors | Check cookbook.log for details |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Cooklang for the recipe markup language
- LaTeX Project for typesetting
- Community contributors and testers
Created with ❤️ by the Cooklang community