Skip to content

AshDevFr/latex-cookbook-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LaTeX Cookbook Template

A professional, customizable LaTeX template for creating beautiful cookbooks and recipe collections.

Example

Features β€’ Quick Start β€’ Documentation β€’ Examples

✨ Features

  • πŸ“– Full Book Structure - Cover, preface, chapters, table of contents, index, and back cover
  • 🌍 Multi-Language Support - Built-in English and French translations via babel
  • 🎨 Flexible Layouts - Multiple recipe layouts (columns, simple) and customizable spacing
  • πŸ–ΌοΈ Rich Media - Full-page images, recipe photos, and chapter dividers
  • 🏷️ Smart Organization - Automatic recipe indexing, tagging system with emoji icons
  • πŸ“ Recipe Notes - Add contextual notes to ingredients and instructions with automatic numbering
  • πŸ“ Conversion Tables - Built-in measurement conversion pages
  • πŸ–¨οΈ Print Production - Bleed margins and gutter settings for book printing
  • βš™οΈ Highly Customizable - Control colors, fonts, spacing, margins, and more
  • πŸ”§ Easy Compilation - Included build script for hassle-free PDF generation

πŸš€ Quick Start

Requirements

  • LaTeX distribution (TeX Live, MiKTeX, etc.)
  • LuaLaTeX engine
  • The babel package (included in most distributions)

Installation

  1. Clone this repository:
git clone https://github.com/AshDevFr/latex-cookbook-template.git
cd latex-cookbook-template
  1. Compile your cookbook:
./build.sh

Your PDF will be generated in the dist/ directory.

Docker Build (Alternative)

If you prefer to build in a controlled environment using Docker:

  1. Build and run with Docker Compose:
docker compose run --rm build
  1. For more build options (verbose mode, force clean build):
docker compose run --rm build ./build.sh -v    # Verbose mode
docker compose run --rm build ./build.sh -f    # Force clean build
docker compose run --rm build ./build.sh -v -f  # Both options

The Docker setup uses the same dependencies as the CI environment, ensuring consistent builds across different systems.

Basic Usage

\documentclass[letterpaper, 10pt, twoside, english]{CookBook}

\begin{document}

% Cover page
\makecoverpage{
    title={My Cookbook},
    subtitle={Family Recipes},
    author={Your Name},
    image={images/book/cover.jpg}
}

% Table of contents
\maketoc

% Chapter
\makechapterpage{
    title={Breakfast},
    image={images/book/breakfast.jpg}
}

% Recipe
\recipe{
    title={Banana Pancakes},
    serves={4},
    preptime={10 mins},
    cookingtime={15 mins},
    tags={Breakfast, Sweet, Vegetarian},
    ingredients={
        \ingredient{2 ripe bananas, mashed}
        \ingredient{2 eggs}
        \ingredient{1/2 cup flour}
    },
    instructions={
        \instruction{Mix all ingredients together.}
        \instruction{Cook on a hot griddle until golden.}
        \instruction{Serve with maple syrup.}
    }
}

\end{document}

πŸ“š Documentation

Comprehensive documentation is organized by topic in the docs/ directory.

Documentation Index

Getting Started:

Page Components:

Recipe System:

Customization:

Additional Resources:

πŸ–ΌοΈ Examples

Chapter Page Recipe Page
Recipe with Image Simple Layout
Multi-page Recipe Compact
View More Examples

Cover and Back Cover

Front Cover Back Cover

Conversion Table and Index

The template supports conversion tables and index pages.

Conversion Table Index

English Examples

Example 1 Example 2
Example 3 Example 4

French Examples

The template supports French language.

French Example 1 French Example 2

Print Version

The template supports print production with bleed margins.

Print Example 1 Print Example 2

All Styles Examples

The template supports all three ingredient styles.

All Styles Example 1 All Styles Example 2

πŸ—‚οΈ Project Structure

latex-cookbook-template/
β”œβ”€β”€ cookbook.cls              # Main LaTeX class file
β”œβ”€β”€ build.sh                  # Build script for compilation
β”œβ”€β”€ Dockerfile                # Docker configuration for controlled builds
β”œβ”€β”€ docker-compose.yml        # Docker Compose configuration
β”œβ”€β”€ README.md                 # This file
β”œβ”€β”€ CHANGELOG.md              # Version history
β”œβ”€β”€ docs/                     # Comprehensive documentation (organized by topic)
β”‚   β”œβ”€β”€ README.md            # Documentation index
β”‚   β”œβ”€β”€ document-class-options.md
β”‚   β”œβ”€β”€ recipe-command.md
β”‚   β”œβ”€β”€ translation.md
β”‚   └── ... (and more)
β”œβ”€β”€ translations/             # Language translation files
β”‚   β”œβ”€β”€ README.md            # Translation guide
β”‚   β”œβ”€β”€ cookbook-english.def
β”‚   └── cookbook-french.def
β”œβ”€β”€ samples/                  # Example cookbook files
β”‚   β”œβ”€β”€ cookbook-sample.tex
β”‚   └── cookbook-sample-fr.tex
β”œβ”€β”€ images/
β”‚   β”œβ”€β”€ book/                # Cover and chapter images
β”‚   └── recipes/             # Recipe photos
β”œβ”€β”€ dist/                    # Generated PDFs (created by build script)
└── tmp/                     # Temporary build files

🀝 Contributing

Contributions are welcome! Whether it's bug reports, feature requests, code contributions, or translations:

Code Contributions

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Translation Contributions

We especially welcome translations for new languages! See translations/README.md for detailed instructions on adding a new language translation.

πŸ“„ License

This template is licensed under CC BY-NC-SA 4.0 - see the Creative Commons website for details.

Attribution: You are free to use this template for non-commercial purposes. If you share or adapt this template, you must give appropriate credit and license your work under the same terms.

πŸ™ Acknowledgments

This template was conceptually inspired by:

This is an independent implementation with significant extensions including multi-language support, full book structure, recipe indexing, conversion tables, and extensive customization options.

πŸ‘€ Author

AshDevFr

⭐ Support

If you find this template useful, please consider giving it a star on GitHub! It helps others discover the project.


Made with ❀️ for home cooks and cookbook creators

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors