add drink formatting

This commit is contained in:
David Daily 2024-08-15 13:48:30 -05:00
parent 4931108bc8
commit e540250aec
7 changed files with 87 additions and 38 deletions

View File

@ -30,11 +30,11 @@
{oz} {ounce}[ounces]
}
\cusetup{use-phrases=true}
\cusetoptionfor{g}{round-precision=0} % rounds grams to whole numbers, I don't care *that* much
% Removing the numbers from the sections & sub-sections
\setcounter{secnumdepth}{0}
\newcounter{stepnum}
\makeatletter
@ -111,6 +111,7 @@
\IfNoValueF{#1}{\begin{center}\testoneline{#1}\end{center}}
\IfNoValueF{#3}{\noindent\emph{#3}\par\medskip}
}
\newcommand{\serves}[2][Serves]{%
\chead{#1 #2}}
\newcommand{\dishtype}[1]{%
@ -183,6 +184,55 @@
\pagestyle{plain}
\setlength{\intextsep}{0pt}
% Different layout for Drinks that adds an hline at the end of a recipe, no serving amounts, no prep/cook time, no letters in the corner
%% #1 [optional headnote]; #2 Title of recipe; #3 [Initial instructions]
\NewDocumentCommand{\drink}{o m o}{%
\setcounter{stepnum}{0}%
\thispagestyle{fancy}
\lhead{}%
\chead{}%
\rhead{}%
\lfoot{}%
\rfoot{}%
\subsection{#2}%
\IfNoValueF{#1}{\begin{center}\testoneline{#1}\end{center}}
\IfNoValueF{#3}{\noindent\emph{#3}\par\medskip}
}
\NewDocumentCommand{\drinkspace}{}{%
\par
\bigskip
\filbreak
\hrulefill
\smallskip
}
\NewDocumentEnvironment{drstep}{}{%
\parindent0pt
\leftskip0pt
\begin{minipage}{\textwidth}
\begin{wrapfigure}{r}{0pt}
\kern-0.5em
\vrule width 1pt\enskip
\begin{minipage}{0.5\textwidth}
\leftskip=1.5em
\parindent=-1.5em
\parskip=0.25em
\obeylines
}{%
\wrapfill
\end{minipage}
\medskip
}
\NewDocumentCommand{\drmethod}{}{%
\end{minipage}
\end{wrapfigure}
\rightskip0pt plus 2em
\parskip0.25em
\everypar={\llap{\stepcounter{stepnum}\hbox to 1.5em{\thestepnum.\hfill}}}
}
\begin{document}
\fontfamily{lmss}\selectfont

View File

@ -1,11 +1,11 @@
\section{Appetizers}
\section{Appetizers}\newpage
\input{recipes/TexasCaviar.tex}
\input{recipes/ChickenSliders.tex}
\section{Desserts}
\newpage\section{Desserts} % ¯\_(ツ)_/¯ won't do it automagically, whatever
\input{recipes/FudgyBrownies42.tex}
\section{Drinks}
\input{recipes/BerrySmoothies.tex}
\input{recipes/MoscowMule.tex}
\input{recipes/TomCollins.tex}
\section{Drinks}\newpage % This one's cause I don't have each drink recipe making its own page
\input{recipes/drinks/BerrySmoothies.tex}\drinkspace
\input{recipes/drinks/MoscowMule.tex}\drinkspace
\input{recipes/drinks/TomCollins.tex} % last one doesn't need it, can't think of a better or easier way to do it so ¯\_(ツ)_

View File

@ -1,4 +1,4 @@
\recipe[Made this for Alissa's 28th birthday and they were delicious!]{Fudgy Brownies}[From America's Test Kitchen Cooking for Two, page 388. Uses a loaf pan and yields 8 brownies. Loaf pan dimensions are \cunum{8_1/2}{in} by \cunum{4_1/2}{in}; if you use a \cunum{9}{in} by \cunum{5}{in} loaf pan, start checking for doneness 5 minutes earlier than advised in the recipe.\\Be careful not to overbake these brownies or they will have a very dry, cakey texture.]
\recipe[Made these for Alissa's 28th birthday and they were delicious!]{Fudgy Brownies}[From America's Test Kitchen Cooking for Two, page 388. Uses a loaf pan and yields 8 brownies. Loaf pan dimensions are \cunum{8_1/2}{in} by \cunum{4_1/2}{in}; if you use a \cunum{9}{in} by \cunum{5}{in} loaf pan, start checking for doneness 5 minutes earlier than advised in the recipe.\\Be careful not to overbake these brownies or they will have a very dry, cakey texture.]
\serves{2}
\preptime{45 minutes}
\cooktime{30 minutes}
@ -9,7 +9,7 @@
\cunum{8_1/2}{in} by \cunum{4_1/2}{in} Loaf pan
Mold release/Butter/Pam spray
\method
Make foil sling for loaf pan by folding 2 long sheets of aluminum foil; first sheet should be \cunum{8_1/2}{in} wide and second sheet should be \cunum{4_1/2}{in} wide. Lay sheets of foil in pan perpendicular to each other, \textbf{with extra foil hanging over sides of pan}, smoothing foil flush to pan. Grease foil.
Make foil sling for loaf pan by folding 2 long sheets of aluminum foil; first sheet should be \cunum{8_1/2}{in} wide and second sheet should be \cunum{4_1/2}{in} wide. Lay sheets of foil in pan perpendicular to each other, \textbf{with an inch of foil hanging over sides of pan to grab later}, smoothing foil flush to pan. Grease foil.
\end{step}
\begin{step}
@ -21,13 +21,17 @@
\end{step}
\begin{step}
\cutext{1/2}{cup} \plus \cutext{2}{EL} (\cunum{4_1/2}{oz} / \cunum[oz=g]{4.5}{oz}) Sugar
\cutext{1/2}{cup} \plus \cutext{2}{EL} Sugar (\cunum{4_1/2}{oz} / \cunum[oz=g]{4.5}{oz})
1 large egg \plus 1 large egg yolk
\cutext{1}{TL} Vanilla Extract
\cutext{1/4}{TL} Salt
\cutext{1/2}{cup} (\cunum{2_1/2}{oz} / \cunum[oz=g]{2.5}{oz}) All-purpose flour
\cutext{1/2}{cup} All-purpose flour (\cunum{2_1/2}{oz} / \cunum[oz=g]{2.5}{oz})
\method
Whisk in medium bowl until combined. Whisk in chocolate mixture until combined. Stir in flour with rubber spatula until just combined.
Whisk ingredients in medium bowl until combined.
Add chocolate mixture and whisk until combined.
Stir in flour with rubber spatula until \textit{just} combined.
Transfer batter to prepared pan; spread batter into corners of pan and make the surface smooth.

View File

@ -1,6 +1,4 @@
\recipe[Teddy's first smoothie and he loved it!]{Berry Good Smoothies}[Blend the following ingredients:]
\serves{3 x 300ml servings}
\preptime{5 minutes}
\drink[Teddy's first smoothie and he loved it!]{Berry Good Smoothies}[Makes 3 x 300ml servings.\\ Blend the following ingredients:]
\noindent\cutext{1_1/2}{cup} Apple juice or milk (usually use oat milk)\\
1 Banana, in chunks\\

View File

@ -1,24 +1,22 @@
\recipe[Alissa's favourite drink]{Moscow Mule}
\serves{1}
\preptime{2 minutes}
\drink[Alissa's favourite drink]{Moscow Mule}
\begin{step}
\begin{drstep}
Cracked ice
\cutext{1_3/4}{oz} Vodka
\cutext{3/4}{oz} Lime juice
\method
\drmethod
Add to cocktail shaker and shake vigorously until well frosted.
\end{step}
\end{drstep}
\begin{step}
\begin{drstep}
Cracked ice
\method
\drmethod
Add cracked ice to a chilled glass and strain cocktail over it.
\end{step}
\end{drstep}
\begin{step}
\begin{drstep}
1 can Ginger beer
Lime wedge, to garnish
\method
\drmethod
Top off with ginger beer, garnish with a lime wedge if desired.
\end{step}
\end{drstep}

View File

@ -1,19 +1,17 @@
\recipe[David's Favourite]{Tom Collins}
\serves{1}
\preptime{1 minute}
\drink[David's Favourite]{Tom Collins}
\begin{step}
\begin{drstep}
Cracked ice
\cutext{2_1/2}{oz} Gin
\cutext{1}{oz} Lemon Juice
\cutext{1/2}{oz} Simple Syrup
\method
\drmethod
Add to a cocktail shaker and shake vigorously until well frosted.
\end{step}
\end{drstep}
\begin{step}
\begin{drstep}
Club Soda
Lemon slice, to garnish
\method
\drmethod
Strain into cholled Collins glass, top off with club soda and garnish with lemon slice.
\end{step}
\end{drstep}

View File

@ -2,10 +2,11 @@
cd "$(dirname "$0")"
# these are so that later it can be edited through the web on gitea and automagically recompile without having to run anything on the webserver manually.
#git fetch --all
#git reset --hard origin/master
pdflatex -file-line-error -interaction nonstopmode -draftmode -shell-escape -jobname=Recipes main.tex
pdflatex -file-line-error -interaction nonstopmode -shell-escape -jobname=Recipes main.tex
rm Recipes.aux Recipes.out Recipes.log Recipes.toc
rm *.aux *.out *.log *.toc
mv Recipes.pdf /home/david/fileshare/LaTeX/