1

I am using the fantastic xcookybooky package (https://github.com/SvenHarder/xcookybooky) to compile recipes; however, several of my recipes are rather short and I would like them all on one page. For example, these two recipes should be on the same page

% Complete recipe 1
\label{sourcream_dip}
\begin{recipe}
[% 
    preparationtime = {\unit[10]{min}},
]
{Sour Cream Dip}
    
    \introduction{%
        A guise under which to sneak a commoner into a fancy ball.  Adjust flavors to taste before moving to a clean bowl for presentation.
    }
    
    \ingredients{%
        \unit[1]{c}&Sour Cream\\
        \unit[2]{Tbsp}&Olive Oil (divided)\\
        \unit[\half]{c}&Grated Parmesan\\
        \unit[1]{tsp}&Smoke Flavoring\\
        Spices:&Paprika, Salt, \& Pepper
    }
    
    \preparation{%
        \step Mix sour cream, \unit[1]{Tbsp} olive oil, Parmesan, and smoke flavoring in a bowl.  Season with salt and pepper to taste.  Move to clean bowl and sprinkle with paprika and drizzle remaining olive oil.
    }
    
\end{recipe}

% Complete recipe 2
\label{rec:roasted_brusselssprouts}
\begin{recipe}
[% 
    preparationtime = {\unit[10]{min}},
    bakingtime={\unit[15-20]{min}},
    bakingtemperature={\protect\bakingtemperature{
        topbottomheat=\unit[425]{\textfahrenheit}}},
    source = {Mark Bittman}
]
{Roasted Brussels Sprouts}
    
    
    \introduction{%
        Thanks Mark for showing me what Brussels Sprouts can be.
    }
    
    \ingredients{%
        \unit[\half]{lbs}&Brussels Sprouts\\
        \unit[1]{Tbsp}&Olive Oil\\
        2&Garlic Cloves\\
        Spices:&Salt
    }
    
    \preparation{%
        \step Prep work: Preheat oven to 425\textfahrenheit with \unit[8]{in} cast iron on the middle rack.  Rinse sprouts.  Cut off the bottom stem and then halve.  Mince garlic and toss with sprouts.
        \step Remove pan from oven, and add olive oil and salt to pan.  Swirl to coat pan.  Arrange all the Brussels sprouts, cut face down in the pan and return to oven for 15-20 minutes until starting to brown on bottom.  Stir and drizzle additional olive oil to serve.
    }
    \suggestion[Variations]{
    \begin{enumerate}
        \item Add \unit[1]{tsp} of balsamic or apple cider vinegar at the end
        \item Add \unit[\half]{Tbsp} of lemon juice at the end
        \item Dice a sweet apple (\textit{e.g.} honeycrisp) and add half way through roasting to potatoes.  Top with Parmesan
        \item Top with grated Parmesan or Asiago.
        \item Toss with \unit[\quarter]{c} tart dried fruit (\textit{e.g.} craisins) and feta at end.
    \end{enumerate}}
\end{recipe}


What settings in the package would make this possible? Thanks!

1
  • Welcome to TeX.SX! Would you mind to extend your code to make it compilable, i.e., to add \documentclass..., \usepackage..., \begin{document}, \end{document}?
    – gernot
    Nov 29, 2020 at 15:16

1 Answer 1

1

Just make the recipes small enough (or the page large enough) such that both recipes fit on the same page. The package does not put the recipes on separate pages by itself (unless necessary). As you see below, the Roasted Brussels Sprouts do not leave enough space for the Sour Cream Dip.

enter image description here

\documentclass{article}
\usepackage{xcookybooky}
\usepackage{textcomp}
\let\half\textonehalf
\let\quarter\textonequarter
\newcommand\textfahrenheit{\textdegree F}
\begin{document}

\begin{recipe}[preparationtime = {\unit[10]{min}}]{Sour Cream Dip}
  \introduction{%
    A guise under which to sneak a commoner into a fancy ball.  Adjust
    flavors to taste before moving to a clean bowl for presentation.
  }
  \ingredients{%
    \unit[1]{c}&Sour Cream\\
    \unit[2]{Tbsp}&Olive Oil (divided)\\
    \unit[\half]{c}&Grated Parmesan\\
    \unit[1]{tsp}&Smoke Flavoring\\
    Spices:&Paprika, Salt, \& Pepper
  }
  \preparation{%
    \begin{enumerate}
    \item Mix sour cream, \unit[1]{Tbsp} olive oil, Parmesan, and
      smoke flavoring in a bowl.  Season with salt and pepper to
      taste.  Move to clean bowl and sprinkle with paprika and drizzle
      remaining olive oil.
    \end{enumerate}
  }
\end{recipe}
\begin{recipe}[preparationtime = {\unit[10]{min}}]{Sour Cream Dip}
  \introduction{%
    A guise under which to sneak a commoner into a fancy ball.  Adjust
    flavors to taste before moving to a clean bowl for presentation.
  }
  \ingredients{%
    \unit[1]{c}&Sour Cream\\
    \unit[2]{Tbsp}&Olive Oil (divided)\\
    \unit[0.5]{c}&Grated Parmesan\\
    \unit[1]{tsp}&Smoke Flavoring\\
    Spices:&Paprika, Salt, \& Pepper
  }
  \preparation{%
    \begin{enumerate}
    \item Mix sour cream, \unit[1]{Tbsp} olive oil, Parmesan, and
      smoke flavoring in a bowl.  Season with salt and pepper to
      taste.  Move to clean bowl and sprinkle with paprika and drizzle
      remaining olive oil.
    \end{enumerate}
  }
\end{recipe}

\begin{recipe}
[% 
    preparationtime = {\unit[10]{min}},
    bakingtime={\unit[15-20]{min}},
    bakingtemperature={\protect\bakingtemperature{topbottomheat=\unit[425]{\textfahrenheit}}},
    source = {Mark Bittman}
]
{Roasted Brussels Sprouts}
    
    
    \introduction{%
        Thanks Mark for showing me what Brussels Sprouts can be.
    }
    
    \ingredients{%
        \unit[0.5]{lbs}&Brussels Sprouts\\
        \unit[1]{Tbsp}&Olive Oil\\
        2&Garlic Cloves\\
        Spices:&Salt
    }
    
    \preparation{%
      \begin{enumerate}
        \item Prep work: Preheat oven to 425\textfahrenheit with \unit[8]{in} cast iron on the middle rack.  Rinse sprouts.  Cut off the bottom stem and then halve.  Mince garlic and toss with sprouts.
        \item Remove pan from oven, and add olive oil and salt to pan.  Swirl to coat pan.  Arrange all the Brussels sprouts, cut face down in the pan and return to oven for 15-20 minutes until starting to brown on bottom.  Stir and drizzle additional olive oil to serve.
        \end{enumerate}
      }
    \suggestion[Variations]{
    \begin{enumerate}
        \item Add \unit[1]{tsp} of balsamic or apple cider vinegar at the end
        \item Add \unit[\half]{Tbsp} of lemon juice at the end
        \item Dice a sweet apple (\textit{e.g.} honeycrisp) and add half way through roasting to potatoes.  Top with Parmesan
        \item Top with grated Parmesan or Asiago.
        \item Toss with \unit[\quarter]{c} tart dried fruit (\textit{e.g.} craisins) and feta at end.
    \end{enumerate}}
\end{recipe}
\end{document}
2
  • Thanks gernot! Excellent. Nov 29, 2020 at 16:23
  • @ChristianMeyer Please remember for your next question to post a complete document such that we don't have to guess at your setup.
    – gernot
    Nov 29, 2020 at 16:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .