From a681a4c26a585e4d6351ef9b1a51d6dcc371d693 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Tue, 28 Jun 2016 09:25:51 -0400 Subject: [PATCH] Convert Strawberry Spinach Salad recipe to TeX Signed-off-by: Anna Schumaker --- recipe.cls | 13 ++++++------ sides/strawberry_spinach_salad.tex | 32 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 sides/strawberry_spinach_salad.tex diff --git a/recipe.cls b/recipe.cls index 4190526..5b8f9e3 100644 --- a/recipe.cls +++ b/recipe.cls @@ -39,7 +39,7 @@ % Format a Fahrenheit temperature \newcommand{\ftemp}[1] {#1\degree F} -\newcommand{\section}[1] +\newcommand{\newsection}[1] { \vspace{0.5em}\flushleft{\Large{\textbf{#1:}}} } @@ -60,7 +60,7 @@ % Add an environment and commands for ingredients \newenvironment{ingredients} { - \section{Ingredients} + \newsection{Ingredients} \begin{multicols}{2} \begin{itemize} } @@ -71,7 +71,7 @@ \newenvironment{ingredientsSmall} { - \section{Ingredients} + \newsection{Ingredients} \begin{itemize} } { @@ -83,9 +83,9 @@ % Add an environment and commands for steps -\newenvironment{steps} +\newenvironment{section}[1] { - \section{Steps} + \newsection{#1} \begin{enumerate} \setlength\itemsep{0.75em} } @@ -93,6 +93,7 @@ \end{enumerate} } +\newenvironment{steps} {\begin{section}{Steps}} {\end{section}} \newcommand{\addStep}[1] {\large{\item{#1}}} \newcommand{\ingredient}[1] {\underline{\smash{#1}}} @@ -100,7 +101,7 @@ % Add a command for other recipe notes \newcommand{\addNote}[2] { - \section{#1} + \newsection{#1} \begin{itemize} \item[]\large{#2} \end{itemize} diff --git a/sides/strawberry_spinach_salad.tex b/sides/strawberry_spinach_salad.tex new file mode 100644 index 0000000..e01effc --- /dev/null +++ b/sides/strawberry_spinach_salad.tex @@ -0,0 +1,32 @@ +% +% Copyright 2016 (c) Anna Schumaker. +% +\documentclass{../recipe} + +\recipeName{Strawberry Spinach Salad} +\recipeServes{4} +\recipeSourceBook{Cooking Light: The Essential Dinner Tonight Cookbook}{290} + +\begin{document} +\begin{ingredients} +\addIngredient{1\half cups}{strawberries, quartered} +\addIngredient{\quarter cup}{red onion, thinly sliced} +\addIngredient{6 ounces}{baby spinach} +\addIngredient{\quarter cup}{evaporated milk} +\addIngredient{3 teaspoons}{sugar} +\addIngredient{1\half tablespoons}{poppy seeds} +\addIngredient{2 tablespoons}{sour cream} +\addIngredient{2 tablespoons}{white vinegar} +\end{ingredients} + +\begin{section}{Salad} +\addStep{Combine \ingredient{strawberries}, \ingredient{onion} and + \ingredient{spinach} in a large bowl. Toss to combine.} +\end{section} + +\begin{section}{Dressing} +\addStep{Combine \ingredient{milk}, \ingredient{sugar}, + \ingredient{poppy seeds}, \ingredient{sour cream}, and + \ingredient{vinegar} in a small bowl. Stir until smooth.} +\end{section} +\end{document}