initial commit

This commit is contained in:
David Daily 2024-08-08 12:24:57 -05:00
commit f984ab01ab
7 changed files with 284 additions and 0 deletions

1
README.md Normal file
View File

@ -0,0 +1 @@
From https://tex.stackexchange.com/questions/366229/an-aesthetically-pleasing-recipe-book-template

176
main.tex Normal file
View File

@ -0,0 +1,176 @@
\documentclass{article}
\usepackage{fancyhdr,wrapfig,xcolor,graphicx,xparse,lmodern,cooking-units}
\renewcommand*\familydefault{\sfdefault} % Force the sans-serif version of any font used
\usepackage[%
papersize={5.5in,8.5in},
margin=0.75in,
top=0.75in,
bottom=0.75in
]{geometry}
% have to define a cup cause the cooking-units writer is german and doesn't understand the flawed american way to measure ingredients.
\declarecookingunit{cup}
\cudefinename {English}
{
{cup} {cup}[cups]
{oz} {ounce}[ounces]
}
\newcounter{stepnum}
\makeatletter
%% From Donald Arseneau. Add after the wrapping text. Whew!
\def\wrapfill{% Just glad it works.
\par
\ifx\parshape\WF@fudgeparshape
\nobreak
\ifnum\c@WF@wrappedlines>\@ne
\advance\c@WF@wrappedlines\m@ne
\vskip\c@WF@wrappedlines\baselineskip
\global\c@WF@wrappedlines\z@
\fi
\allowbreak
\WF@finale
\fi
}
%% Used for the headnote and in \showit
%% If the text is small it is placed on one line;
%% otherwise it is put into a raggedright paragraph.
\long\def\testoneline#1{%
\sbox\@tempboxa{#1}%
\ifdim \wd\@tempboxa <0.75\linewidth
\begingroup
\itshape
#1\par
\endgroup
\else
\parbox{0.75\linewidth}{\raggedright\itshape#1}%
\par
\fi
}
\newif\if@mainmatter \@mainmattertrue
%% Borrowed from book.cls
\newcommand\frontmatter{%
\cleardoublepage
\@mainmatterfalse
\pagenumbering{roman}
\tableofcontents}
\newcommand\mainmatter{%
\cleardoublepage
\@mainmattertrue
\pagenumbering{arabic}}
\makeatother
%% Vary the colors at will
\definecolor{vegcolor}{rgb}{0,0.5,0.2}
\colorlet{gfcolor}{brown}
\definecolor{frzcolor}{rgb}{0,0.8,0.8}
\definecolor{dessertcolor}{rgb}{0.5,0.2,0.1}
\definecolor{makeaheadcolor}{rgb}{0.5,0.5,0.6}
%% Thanks to alephzero for the excellent start:
%% #1 [optional headnote]; #2 Title of recipe; #3 [Initial instructions]
\NewDocumentCommand{\recipe}{o m o}{%
\setcounter{stepnum}{0}%
\newpage
\thispagestyle{fancy}
\lhead{}%
\chead{}%
\rhead{}%
\lfoot{}%
\rfoot{}%
\section{#2}%
\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]{%
\rhead{#1}%
}
\newcommand{\dishother}[1]{%
\lhead{#1}%
}
\newcommand{\vegetarian}{%
{\large\color{vegcolor}\textbf{V}}%
}
\newcommand{\glutenfree}{%
{\large\color{gfcolor}\textbf{GF}}%
}
\newcommand{\freeze}{%
{\large\color{frzcolor}\textbf{F}}%
}
\newcommand{\dessert}{%
{\large\color{dessertcolor}\textbf{D}}%
}
\newcommand{\makeahead}{%
{\large\color{makeaheadcolor}\textbf{M}}%
}
%% Optional arguments for alternate names for these:
\newcommand{\preptime}[2][Prep time]{%
\lfoot{#1: #2}%
}
\newcommand{\cooktime}[2][Cook time]{%
\rfoot{#1: #2}%
}
\newcommand{\temp}[1]{%
#1°C}
%% Optional argument is the width of the graphic, default = 1in
\newcommand{\showpic}[3][1in]{%
\begin{center}
\bigskip
\includegraphics[width=#1]{#2}%
\par
\medskip
\testoneline{#3}%
\par
\end{center}%
}
\NewDocumentEnvironment{step}{}{%
\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{\method}{}{%
\end{minipage}
\end{wrapfigure}
\rightskip0pt plus 2em
\parskip0.25em
\everypar={\llap{\stepcounter{stepnum}\hbox to 1.5em{\thestepnum.\hfill}}}
}
\pagestyle{plain}
\setlength{\intextsep}{0pt}
\begin{document}
\fontfamily{lmss}\selectfont
\frontmatter
\mainmatter
\input{orderedrecipes.tex}
\end{document}

6
orderedrecipes.tex Normal file
View File

@ -0,0 +1,6 @@
%need sections!!
\part{Appetizers}
\input{recipes/TexasCaviar.tex}
\input{recipes/ChickenSliders.tex}
\part{Main Dishes}

View File

@ -0,0 +1,27 @@
\recipe[Found on the internet. One of the first recipes I made for David at my first Apt. on Maple.]{Chicken Sliders}[Prepare skillet for frying chicken, preheat oven to 350°F.]
\serves{12}
\preptime{45 minutes}
\cooktime{20 minutes}
\dishtype{Casserole}
\begin{step}
\cutext{1}{TL} Garlic powder
Salt to taste
\cutext{1.5}{cup} Bread crumbs
\method
Mix garlic powder, bread crumbs and salt together in small bowl
\end{step}
\begin{step}
\cutext{1}{lb} Chicken breasts
\method
Cut \& pound chicken. Dip chicken into flour, then eggs, then bread mix. Fry until golden brown
\end{step}
\begin{step}
Hamburger buns
1 jar marinara sauce\textcolor{red}{?}
1 package mozzarella cheese\textcolor{red}{?}
\method
Put bottom of hamburger buns in casserole dish, then add fried chicken, marinara sauce, and cheese, and top bun. Bake on 350°F for 10-15 minutes.
\end{step}

42
recipes/TEMPLATE Normal file
View File

@ -0,0 +1,42 @@
https://tex.stackexchange.com/questions/366229/an-aesthetically-pleasing-recipe-book-template
\recipe[Some would say this is better than pie. It is certainly easier. And delicious. The original recipe came from Dorie Greenspan; this version also includes almond flour, suggested by King Arthur Baking.]{French Apple Cake}[Center a rack in the oven and preheat the oven to 350°F. Generously butter an 8-inch springform pan and put it on a baking sheet lined with a silicone baking mat or parchment paper.]
\serves{6-8}
\preptime{1 hour}
\cooktime{1 hour}
\dishtype{\dessert}
\dishother{\glutenfree}
\begin{step}
. . Batter, the dry:
1 cup AP (or GF) flour
½ cup almond flour
1 teaspoon baking powder
½ teaspoon cinnamon
¼ teaspoon nutmeg
¼ teaspoon salt
\method
Whisk the flour, baking powder, spices, and salt together in small bowl.
\end{step}
\begin{step}
4 large apples (if you can, choose 4 different kinds)
\method
Peel the apples, cut them in half and remove the cores. Cut the apples into 1- to 2-inch chunks.
\end{step}
\begin{step}
. . Batter, the wet:
2 large eggs
¾ cup maple or brown sugar
3 tablespoons dark rum
½ teaspoon pure vanilla extract
2--3 drops lemon extract
8 tablespoons unsalted butter, melted and cooled
\method
In a medium bowl, beat the eggs with a whisk until theyre foamy. Pour in the sugar and whisk for a minute or so to blend. Whisk in the rum, vanilla, and lemon oil. Whisk in the flour and when it is incorporated, add the melted butter, mixing gently so that you have a smooth, rather thick batter.
Use a rubber spatula to fold-in the apples--it might look as if there isn't enough batter, but there is. Put the batter into the prepared pan, smoothing the top as much as possible. Bake for 55--65 minutes, or until a toothpick inserted in the middle comes out clean.
Let cool 30 minutes. Before removing the side of the springform pan, run a knife around the edge of the cake to make sure no apples stuck to the pan.
\end{step}

21
recipes/TexasCaviar.tex Normal file
View File

@ -0,0 +1,21 @@
\recipe[This was given to me by the daughter of one of my very sweet hospice patients who always thought everything was "A-okay".]{Texas Caviar}
\serves{many}
\preptime{20 minutes}
%\cooktime{1 hour}
\dishtype{Appetizer}
\begin{step}
1 can black beans\textcolor{red}{?}
1 can black eyed peas\textcolor{red}{?}
1 can corn\textcolor{red}{?}
2 cans petite diced tomatoes\textcolor{red}{?}
\method
Rinse \& drain
\end{step}
\begin{step}
\cutext{1}{TL} Minced garlic
\cutext{8}{oz} Kraft Zesty Italian Salad Dressing
\method
Mix everything together and eat!
\end{step}

11
render.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
cd "$(dirname "$0")"
#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
mv Recipes.pdf /home/david/fileshare/.secret/