Thanks to @alephzero for making this a real LaTeX project. That is to say, concentrating on the semantics of the recipe as opposed to LaTeX markup.
To that end, I prefer clean and uncluttered input and output. I have used \obeylines
to emulate list environments without their attendant markup. I have also used a bit of color to indicate some possibilities. I have included comments in my very simple code which should show the way. Computer Modern would not be my choice, but I don't know what your TeXing environment is so did not want to make any untoward assumptions. I would keep ornamentation at a minimum (rules and such) to assist in making the presentation of the recipe as clear as possible. Bon appetit.
Later:
I have supplied some missing %
. In addition I have supplied the possibility of a headnote as an optional argument to \recipe
. In addition, for my own benefit, I have enlisted the aid of geometry.sty
to produce 5.5in-by-8.5in output. That, of course, can be changed to suit.
Still later:
I should also point out that this creates a TOC using \frontmatter
and \backmatter
from book.cls
. Kind of like peanuts: you can't eat just one...
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = XeLaTeX
%% pagestyle alterations per user request 14 xii 2020
\documentclass{article}
\usepackage{fancyhdr}
\usepackage{multicol}
\usepackage[%
%a5paper,
papersize={5.5in,8.5in},
margin=0.75in,
top=0.75in,
bottom=0.75in,
%twoside
]{geometry}
\usepackage{xcolor}
\usepackage{graphicx}
\raggedcolumns
\setlength{\multicolsep}{0pt}
\setlength{\columnseprule}{1pt}
\makeatletter
%% 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}}
\newcommand\mainmatter{%
\cleardoublepage
\@mainmattertrue
\pagenumbering{arabic}}
\makeatother
%% Vary the colors at will
\definecolor{vegcolor}{rgb}{0,0.5,0.2}
\definecolor{frzcolor}{rgb}{0,0,1}
\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:
\newcommand{\recipe}[2][]{%
\newpage
\thispagestyle{fancy}
\lhead{}%
\chead{}%
\rhead{}%
\lfoot{}%
\rfoot{}%
\section{#2}%
\if###1##%
\else
\begin{center}
\testoneline{#1}%
\end{center}
\fi
}
\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{\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^\circ$C}
%% Optional argument is the width of the graphic, default = 1in
\newcommand{\showit}[3][1in]{%
\begin{center}
\bigskip
\includegraphics[width=#1]{#2}%
\par
\medskip
\testoneline{#3}%
\par
\end{center}%
}
%% Optional argument for a heading within the ingredients section
\newcommand{\ingredients}[1][]{%
\if###1##%
{\color{red}\Large\textbf{Ingredients}}%
\else
\emph{#1}%
\fi
}
%% Use \obeylines to minimize markup
\newenvironment{ingreds}{%
\parindent0pt
\noindent
\ingredients
\par
\smallskip
\begin{multicols}{2}
\leftskip1em
\rightskip0pt plus 3em
\parskip=0.25em
\obeylines
\everypar={\hangindent2em}
}{%
\end{multicols}%
\medskip
}
\newcounter{stepnum}
%% Optional argument for an italicized pre-step
%% Also use obeylines to minimize markup here as well
\newenvironment{method}[1][]{%
\setcounter{stepnum}{0}
\noindent
{\color{red}\Large\textbf{Instructions}}%
\par
\smallskip
\if###1##%
\else
\noindent
\emph{#1}
\par
\fi
\begingroup
\parindent0pt
\parskip0.25em
\leftskip2em
\everypar={\llap{\stepcounter{stepnum}\hbox to2em{\thestepnum.\hfill}}}
}{%
\par
\endgroup
}
\pagestyle{plain}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\recipe[This is a simple headnote that describes the product for the user. A simple but elegant dessert.]{Raspberry Chocolate Tiramisu}
\serves{4}
\preptime{1 hour}
\cooktime[Chill time]{1$\frac{1}{2}$ hours}
\dishtype{\dessert,\vegetarian}
\dishother{\makeahead, \freeze}
\begin{ingreds}
100ml double strength coffee
400g raspberries (blitzed)
200g mascarpone
2 tbsp sweetener
1 tsp vanilla extract
700g vanilla yogurt
15g dark chocolate (finely grated) and a really long one
\columnbreak
\ingredients[For the Crumble Mixture:]
80g wholemeal flour
80g plain flour
80g butter (diced)
70g demerara sugar
\end{ingreds}
\begin{method}[Preheat the oven to Gas Mark 4, Electric \temp{180}, Fan \temp{160}.]
Stir the two kinds of flour together in a bowl, add the butter and rub it into the flour. When the mixture looks like breadcrumbs, mix in the brown sugar. Lay the mixture on a shallow baking tray and bake for 25--30 minutes until golden brown. Leave on the side to cool.
Mix together the mascarpone, sweetener, vanilla extract, and three quarters of the chocolate. Put half the crumble mixture in each of the glasses, sprinkling over with half the coffee, and pour over half the mascarpone mixture along with half the raspberries.
Put the other half of the crumble mixture on top, sprinkling over with the remaining half of the coffee, followed by the remaining quark mixture and raspberries. Sprinkle over the last of the chocolate. Chill for 3 hours before serving.
\end {method}
\showit[1.25in]{example-image-b}{This is a picture}
\end{document}
On second thought...
I am not overly fond of this format, bipartite, in which the ingredients are presented by themselves in a visually distinct area, and quite sepatate from the method. Ostensibly, the purpose of this was to allow the user to see at the outset what raw materials would be required. Isabella Beeton (Book of Household management, 1861) urged her readers to “follow precisely the order in which the recipes are given. Thus, let them first place on their table all the INGREDIENTS necessary; then the modus operandi, or MODE of preparation, will be easily managed,” in a practice now commonly called mis en place. But too often, particularly in longer recipes, something (often an ingredient) gets lost or misread, or a step is skipped or misunderstood as the eye travels back an forth between the ingredients and the method. The effect is analagous to reading overly long lines of text: The eye has trouble correctly locating the beginning of the next line, and either reads the same line again or skips a line. (https://www.fonts.com/content/learning/fontology/level-2/text-typography/length-column-width) In any event, suffice it to say that I would format this recipe rather differently (see below).
For the present, I will stick with this recipe as-is, and address another issue: the specification of the ingredients. Ever since the appearance of the bipartite format in print (in the English language, early 19th century) ingredients have been given in a distinctly narrative format: 1 teaspoon [of] salt, 1 cup [of] flour, 2 ounces [of] cocoa, etc. Though idiomatic in speech, in print this gives the impression that somehow the amount of the ingredient is the hot topic, not the identity of the ingredient itself. Fortunately, TeX provides the tools to correct this by parsing the ingredients without unduly disturbing this customary (if unsatisfactory) format with unnecessary markup. Moreover, ingredients should be captalized only if not preceded by a quantity (Whitman, Recipes into Type, pp.124--125), as here. Further, units of measure are best left unabbreviated (Whitman, Recipes into Type, pp. 15--16), except in the case of limited space.
Additionally, I am letting an OpenType font (STIX Two) take care of the degree symbol (°) and the fraction (½), further minimizing coding.
\documentclass{article}
\usepackage{fancyhdr,multicol,xcolor,graphicx,xparse,fontspec}
\usepackage[%
%a5paper,
papersize={5.5in,8.5in},
margin=0.75in,
top=0.75in,
bottom=0.75in,
%twoside
]{geometry}
\makeatletter
%% 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}}
\newcommand\mainmatter{%
\cleardoublepage
\@mainmattertrue
\pagenumbering{arabic}}
\makeatother
%% Vary the colors at will
\definecolor{vegcolor}{rgb}{0,0.5,0.2}
\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:
\newcommand{\recipe}[2][]{%
\newpage
\thispagestyle{fancy}
\lhead{}%
\chead{}%
\rhead{}%
\lfoot{}%
\rfoot{}%
\section{#2}%
\if###1##%
\else
\begin{center}
\testoneline{#1}%
\end{center}
\fi
}
\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{\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{\showit}[3][1in]{%
\begin{center}
\bigskip
\includegraphics[width=#1]{#2}%
\par
\medskip
\testoneline{#3}%
\par
\end{center}%
}
%% Optional argument for a heading within the ingredients section
\newcommand{\ingredients}[1][]{%
\if###1##%
{\color{red}\Large\textbf{Ingredients}}%
\else
\emph{#1}%
\fi
}
\def\ucit#1{\uppercase{#1}}
\begingroup
\lccode`~=`\^^M
\lowercase{%
\endgroup%% Ingredient first, then measure; empty measure and/or unit = " . "
%% *=column break; amount<space>ingredient
\NewDocumentCommand{\ing}{s u{ } u{~}}{% %% basically the same as: \def\ing#1 #2~{%
%% or: \bfseries\ucit#3\if#1#2---\else,\ \fi
\if.#2%
\emph{#3}~ % A heading
\else % Amounts containing spaces <1 teaspoon> have to use '~' <1~teaspoon>
\textbf{\ucit#3, }#2 \IfBooleanT{#1}{\columnbreak}~ %
\fi
}%
}%
%% Use \obeylines to minimize markup
\newenvironment{ingreds}{%
\parindent0pt
\noindent
\ingredients
\par
\smallskip
\begin{multicols}{2}
\leftskip1em
\parindent-1em
\rightskip0pt plus 3em
\parskip=0.25em
\obeylines
\everypar={\ing}
}{%
\end{multicols}%
\medskip
}
\newcounter{stepnum}
%% Optional argument for an italicized pre-step
%% Also use obeylines to minimize markup here as well
\newenvironment{method}[1][]{%
\setcounter{stepnum}{0}
\noindent
{\color{red}\Large\textbf{Instructions}}%
\par
\smallskip
\if###1##%
\else
\noindent
\emph{#1}
\par
\fi
\begingroup
\rightskip0pt plus 3em
\parindent0pt
\parskip0.25em
\leftskip2em
\everypar={\llap{\stepcounter{stepnum}\hbox to2em{\thestepnum.\hfill}}}
}{%
\par
\endgroup
}
\setmainfont{STIX Two Text}
\pagestyle{plain}
\raggedcolumns
\setlength{\multicolsep}{0pt}
\setlength{\columnseprule}{1pt}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\recipe[This is a simple headnote that describes the product for the user. A simple but elegant dessert.]{Raspberry Chocolate Tiramisu}
\serves{4}
\preptime{1 hour}
\cooktime[Chill time]{1½ hours}
\dishtype{\dessert,\vegetarian}
\dishother{\makeahead, \freeze}
\begin{ingreds}% amount<space>ingredient; initial <.>=comment;*=column break
100ml double strength coffee
400g raspberries (blitzed)
200g mascarpone
2~tablespoons sweetener
1~teaspoon vanilla extract
700g vanilla yogurt
*15g dark chocolate (finely grated)
. for the crumble mixture:
80g wholemeal flour
80g plain flour
80g butter (diced)
70g demerara sugar
\end{ingreds}
\begin{method}[Preheat the oven to Gas Mark 4, Electric \temp{180}, Fan \temp{160}.]
Stir the two kinds of flour together in a bowl, add the butter and rub it into the flour. When the mixture looks like breadcrumbs, mix in the brown sugar. Lay the mixture on a shallow baking tray and bake for 25--30 minutes until golden brown. Leave on the side to cool.
Mix together the mascarpone, sweetener, vanilla extract, and three quarters of the chocolate. Put half the crumble mixture in each of the glasses and pour over half the quark mixture along with half the raspberries.
Put the other half of the crumble mixture on top, followed by the remaining quark mixture and raspberries. Sprinkle over the last of the chocolate. Chill for 3 hours before serving.
\end {method}
\showit[1.25in]{example-image-b}{This is a picture}
\end{document}
And finally...
Here is the same recipe in coordinated bipartite format, that is, the ingredients for each step have been shown with (coordinate with) that step. A mystery appeared when I discovered that the original recipe did not actually use the “double strength coffee” called for in the ingredient list. I have attempted to fix that omission in all three versions.
\documentclass{article}
\usepackage{fancyhdr,wrapfig,xcolor,graphicx,xparse,fontspec}
\usepackage[%
%a5paper,
papersize={5.5in,8.5in},
margin=0.75in,
top=0.75in,
bottom=0.75in,
%twoside
]{geometry}
\newcounter{stepnum}
%% |=====8><-----| %%
\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}}
\newcommand\mainmatter{%
\cleardoublepage
\@mainmattertrue
\pagenumbering{arabic}}
\makeatother
%% Vary the colors at will
\definecolor{vegcolor}{rgb}{0,0.5,0.2}
\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{\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}%
}
\def\ucit#1{\uppercase{#1}}
\begingroup
\lccode`~=`\^^M
\lowercase{%
\endgroup%% Ingredient first, then measure; empty measure and/or unit = " . "
%% *=column break; amount<space>ingredient
\NewDocumentCommand{\ing}{u{ } u{~}}{% %% basically the same as: \def\ing#1 #2~{% requires xparse
\noindent
\if.#1% Is a heading, a non-ingredient, in the ingredients block
\emph{#2}~ % A heading
\else % Amounts containing spaces <1 teaspoon> have to use '~' <1~teaspoon>
\textbf{\ucit#2, }#1~ %
\fi
}%
}%
\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
\everypar={\ing}
}{%
\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}}}
}
\setmainfont{STIX Two Text}
\pagestyle{plain}
\setlength{\intextsep}{0pt}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\recipe[This is a simple headnote that describes the product for the user. A simple but elegant dessert.]{Raspberry Chocolate Tiramisu}[Preheat the oven to Gas Mark 4, Electric \temp{180}, Fan \temp{160}.]
\serves{4}
\preptime{1 hour}
\cooktime[Chill time]{1½ hours}
\dishtype{\dessert,\vegetarian}
\dishother{\makeahead, \freeze}
\begin{step}
100ml double strength coffee
400g raspberries
\method
Prepare the coffee and set aside to cool; mash the raspberries with a fork and set aside.
\end{step}
\begin{step}
. For the crumble mixture:
80g wholemeal flour
80g plain flour
80g butter (diced)
70g demerara sugar
\method
Stir the two kinds of flour together in a bowl, add the butter and rub it into the flour. When the mixture looks like breadcrumbs, mix in the brown sugar. Lay the mixture on a shallow baking tray and bake for 25--30 minutes until golden brown. Leave on the side to cool.
\end{step}
\begin{step}
200g mascarpone
2~tablespoons sweetener
1~teaspoon vanilla extract
700g vanilla yogurt
15g dark chocolate (finely grated)
\method
Mix together the mascarpone, sweetener, vanilla extract, and three quarters of the chocolate.
Put half the crumble mixture in each of the glasses, sprinkling over half the coffee, and pour over half the quark mixture along with half the raspberries.
Put the other half of the crumble mixture on top, sprinkling over the remaining half of the coffee, followed by the remaining quark mixture and raspberries. Sprinkle over the last of the chocolate. Chill for 3 hours before serving.
\end{step}
\showpic[1.25in]{example-image-b}{This is a picture}
\end{document}
One last thing...
As @Alborz quite rightly pointed out, there are some things here that need fixing. For the problem of an ingredient list that is longer than its corresponding method we can thank Donald Arseneau for supplying the fix, \wrapfill
which can be found in wrapfig.sty
and which has been used in the following. Entering the ingredients is also a more straightforward in the following code:
\documentclass{article}
\usepackage{fancyhdr,wrapfig,xcolor,graphicx,xparse,fontspec}
\usepackage[%
%a5paper,
papersize={5.5in,8.5in},
margin=0.75in,
top=0.75in,
bottom=0.75in,
%twoside
]{geometry}
\newcounter{stepnum}
%% |=====8><-----| %%
\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}}
\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}%
}
\def\ucit#1{\uppercase{#1}}
\begingroup
\lccode`~=`\^^M
\lowercase{%
\endgroup%% Ingredient first, then measure; empty measure and/or unit = " . "
%% *=column break; amount<space>ingredient
\NewDocumentCommand{\ing}{u{ } u{ } u{~}}{% %% basically the same as: \def\ing#1 #2~{% requires xparse
\noindent
\if#1#2% Is a heading, a non-ingredient, in the ingredients block
\emph{#3}~ % A heading
\else % Amounts containing spaces <1 teaspoon> have to use '~' <1~teaspoon>
\textbf{\ucit#3, }#1\if.#2\else\ #2\fi~ %
\fi
}%
}%
\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
\everypar={\ing}
}{%
\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}}}
}
\setmainfont{STIX Two Text}
\pagestyle{plain}
\setlength{\intextsep}{0pt}
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\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 they’re 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}
\end{document}
I am tempted, one of these days, to start a blog along the lines of “TeX in the Kitchen” or “TeX en Cuisine” -- might prove to be interesting...