From 2049bc97ea369078bca4aecddd6496c5a7732306 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Sat, 25 Jun 2016 14:30:11 -0400 Subject: [PATCH] Convert Pancakes recipe to TeX Signed-off-by: Anna Schumaker --- pancakes.tex | 41 +++++++++++++++++++++++++++++++++++++++++ recipe.cls | 11 +++++++---- 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 pancakes.tex diff --git a/pancakes.tex b/pancakes.tex new file mode 100644 index 0000000..c9d73f4 --- /dev/null +++ b/pancakes.tex @@ -0,0 +1,41 @@ +% +% Copyright 2016 (c) Anna Schumaker. +% +\documentclass{recipe} + +\recipeName{Pancakes} +\recipeServes{4} +\recipeServingSize{3 pancakes} +\recipeSourceWeb{Fluffy Pancakes}{AllRecipes.com} + +\begin{document} +\begin{ingredients} +\addIngredient{\threequarters cup}{milk} +\addIngredient{2 tablespoons}{white vinegar} +\addIngredient{1 cup}{all-purpose flour} +\addIngredient{2 tablespoons}{white sugar} +\addIngredient{1 teaspoon}{baking powder} +\addIngredient{\half teaspoon}{baking soda} +\addIngredient{\half teaspoon}{salt} +\addIngredient{1}{egg} +\addIngredient{2 tablespoons}{butter, melted} +\addIngredient{\half cup}{applesauce (optional)} +\addIngredientName{Cooking Spray} +\end{ingredients} + +\begin{steps} +\addStep{Combine \ingredient{milk} and \ingredient{vinegar} in a large bowl + and let sit for \textbf{5 minutes}.} +\addStep{Combine \ingredient{flour}, \ingredient{sugar}, + \ingredient{baking powder}, \ingredient{baking soda}, and + \ingredient{salt} in a medium mixing bowl.} +\addStep{Whisk \ingredient{egg} and \ingredient{butter} into milk. Add + \ingredient{flour mixture} and stir until smooth. (Optional) stir in + \ingredient{applesauce}.} +\addStep{Heat a large, nonstick skillet over \textbf{medium} heat. Coat with + \ingredient{cooking spray}.} +\addStep{Pour \textbf{\quarter cupfuls} of batter onto the skillet and cook + until bubbles appear on the surface. Flip with a spatula and cook + until the other side has browned.} +\end{steps} +\end{document} diff --git a/recipe.cls b/recipe.cls index ea82784..6baa5ac 100644 --- a/recipe.cls +++ b/recipe.cls @@ -21,10 +21,12 @@ \newcommand{\recipeSourceWeb}[2] {\recipeSource{{\em #1}. Source: #2}} % Preformatted fractions -\newcommand{\half} {\(\mathbf{\frac{1}{2}}\)\ } -\newcommand{\twothirds} {\(\mathbf{\frac{2}{3}}\)\ } -\newcommand{\quarter} {\(\mathbf{\frac{1}{4}}\)\ } -\newcommand{\eighth} {\(\mathbf{\frac{1}{8}}\)\ } +\newcommand{\fraction}[2] {\(\mathbf{\frac{#1}{#2}}\)\ } +\newcommand{\half} {\fraction{1}{2}} +\newcommand{\twothirds} {\fraction{2}{3}} +\newcommand{\quarter} {\fraction{1}{4}} +\newcommand{\threequarters} {\fraction{3}{4}} +\newcommand{\eighth} {\fraction{1}{8}} % Format a Fahrenheit temperature \newcommand{\ftemp}[1] {#1\degree F} @@ -40,6 +42,7 @@ { \centering{ \Huge{\textbf{\recipe@name}}\LARGE{\recipe@source} \\ + \vspace{5pt} \LARGE{\em{Serves: \textbf{\recipe@serves}, % serving size: \textbf{\recipe@servingsize}}} } \\