%%
%% This is file `cuisine.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cuisine.dtx 
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from cuisine.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file cuisine.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%
%% Recipe typesetting package `cuisine' by Ben Cohen.
%% cuisine.dtx
%% Copyright 2000-2002, 2014 Ben Cohen
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cuisine}[2014/06/26 v0.7 recipe typesetting]
\RequirePackage{nicefrac}
\newcounter{r@cipenumber}
\DeclareRobustCommand{\ResetRecipeCounter}{%
  \setcounter{r@cipenumber}{0}%
}
\newcounter{st@pnumber}[r@cipenumber]
\newcounter{ingr@dnumber}[st@pnumber]
\newif\ifnumb@ring
\newif\ifc@ntentsing
\newif\ifind@xing
\newif\iffr@eforming
\newif\ifn@wpaging
\newlength{\R@cipeWidth}
\newlength{\R@cipeNumberWidth}
\newlength{\R@cipeTitleWidth}
\newlength{\R@cipeServingsWidth}
\newlength{\R@cipeTandSWidth}
\newlength{\R@cipeOutdent}
\newlength{\R@cipeIngQUSpace}
\newlength{\R@cipeIngUISpace}
\newlength{\R@cipeTitleVerticalAdjustTop}
\newlength{\R@cipeTitleVerticalAdjustBot}
\newlength{\R@cipeIngredientWidth}
\newlength{\R@cipeQuantityWidth}
\newlength{\R@cipeUnitsWidth}
\newlength{\R@cipeQandUWidth}
\newlength{\R@cipeIandUWidth}
\newlength{\R@cipeIQUWidth}
\newlength{\R@cipeSingleIngWidth}
\newlength{\R@cipeMethodWidth}
\newlength{\St@pNumberWidth}
\newlength{\R@cipeStepWidth}
\DeclareRobustCommand*{\R@cipeMethodWidths}[4]{%
  \setlength{\St@pNumberWidth}{#1}%
  \setlength{\R@cipeIngredientWidth}{#2}%
  \setlength{\R@cipeQuantityWidth}{#3}%
  \setlength{\R@cipeUnitsWidth}{#4}%
  \setlength{\R@cipeQandUWidth}{\R@cipeQuantityWidth}%
  \addtolength{\R@cipeQandUWidth}{\R@cipeUnitsWidth}%
  \setlength{\R@cipeIQUWidth}{\R@cipeQandUWidth}%
  \addtolength{\R@cipeIQUWidth}{\R@cipeIngredientWidth}%
  \addtolength{\R@cipeIQUWidth}{0.5cm}%
  \setlength{\R@cipeIandUWidth}{\R@cipeIQUWidth}%
  \addtolength{\R@cipeIandUWidth}{-\R@cipeQuantityWidth}%
  \setlength{\R@cipeStepWidth}{\R@cipeWidth}%
  \addtolength{\R@cipeStepWidth}{-\St@pNumberWidth}%
  \setlength{\R@cipeMethodWidth}{\R@cipeStepWidth}%
  \addtolength{\R@cipeMethodWidth}{-\R@cipeIngredientWidth}%
  \addtolength{\R@cipeMethodWidth}{-\R@cipeQandUWidth}%
  \addtolength{\R@cipeMethodWidth}{-0.5cm}%
  \setlength{\R@cipeSingleIngWidth}{\R@cipeIQUWidth}%
  \addtolength{\R@cipeIngredientWidth}{-\R@cipeOutdent}
  \addtolength{\R@cipeUnitsWidth}{-\R@cipeOutdent}
  \addtolength{\R@cipeQandUWidth}{-\R@cipeOutdent}
  \addtolength{\R@cipeSingleIngWidth}{-\R@cipeOutdent}
  \addtolength{\R@cipeSingleIngWidth}{-\R@cipeIngQUSpace}
  \addtolength{\R@cipeSingleIngWidth}{-\R@cipeIngUISpace}
}%
\DeclareRobustCommand*{\R@cipeTitleWidths}[1]{%
  \setlength{\R@cipeServingsWidth}{#1}%
  \setlength{\R@cipeTitleWidth}{\R@cipeWidth}%
  \addtolength{\R@cipeTitleWidth}{-\R@cipeServingsWidth}%
  \setlength{\R@cipeTandSWidth}{\R@cipeServingsWidth}%
  \addtolength{\R@cipeTandSWidth}{\R@cipeTitleWidth}%
}
\DeclareRobustCommand*{\RecipeWidths}[6]{%
  \setlength{\R@cipeWidth}{#1}%
  \R@cipeTitleWidths{#2}%
  \R@cipeMethodWidths{#3}{#4}{#5}{#6}%
}%
\setlength{\R@cipeOutdent}{0.3cm}%
\setlength{\R@cipeIngQUSpace}{0.1cm}%
\setlength{\R@cipeIngUISpace}{0.2cm}%
\setlength{\R@cipeTitleVerticalAdjustTop}{-0.25cm}
\setlength{\R@cipeTitleVerticalAdjustBot}{-0.25cm}
\RecipeWidths{\textwidth}{3cm}{0.8cm}{3.5cm}{1cm}{1.7cm}
\newcommand*\recipefont{\normalfont}
\newcommand*\recipetitlefont{\recipefont}
\newcommand*\recipenumberfont{\recipefont}
\newcommand*\recipestepnumberfont{\recipefont}
\newcommand*\recipequantityfont{\recipefont}
\newcommand*\recipeunitfont{\recipefont}
\newcommand*\recipeingredientfont{\recipefont}
\newcommand*\recipemethodfont{\recipefont}
\newcommand*\recipeservingsfont{\recipefont}
\newcommand*\recipetimefont{\recipefont}
\newcommand*\recipefreeformfont{\recipefont}
\newsavebox{\st@pingrbox}
\newsavebox{\st@pingrtmpbox}
\newsavebox{\titl@tmpbox}
\newsavebox{\st@pIQUbox}
\newsavebox{\st@pmethodbox}
\DeclareOption{number}{\numb@ringtrue}
\DeclareOption{nonumber}{\numb@ringfalse}
\DeclareOption{contents}{\c@ntentsingtrue}
\DeclareOption{nocontents}{\c@ntentsingfalse}
\DeclareOption{index}{\ind@xingtrue}
\DeclareOption{noindex}{\ind@xingfalse}
\ExecuteOptions{number,noindex,nocontents}
\ProcessOptions\relax
\DeclareRobustCommand{\Displ@ySt@p}{%
  \stepcounter{st@pnumber}%
  \makebox[\R@cipeWidth]{%
    \makebox[\St@pNumberWidth][l]{\recipestepnumberfont\arabic{st@pnumber}}%
    \usebox{\st@pingrbox}%
    \usebox{\st@pmethodbox}%
  }%
  \savebox{\st@pingrbox}[\R@cipeIQUWidth]{}
}%
\DeclareRobustCommand{\Fr@eFormStep}{%
  \usebox{\st@pmethodbox}%
  \savebox{\st@pmethodbox}[\R@cipeMethodWidth]{}%
}%
\DeclareRobustCommand{\DisplaySt@p}{%
  \iffr@eforming%
    \Fr@eFormStep%
  \else%
    \Displ@ySt@p%
  \fi%
  \ifn@wpaging%
    \recipen@wpage%
  \else%
    \vskip0.2cm%
  \fi%
  \n@wpagingfalse%
}%
\DeclareRobustCommand{\r@cipetitle}[3]{%
  \mbox{%
    \makebox[\R@cipeWidth][t]{%
      \parbox[t]{\R@cipeWidth}{%
        \ifnumb@ring%
          \savebox{\titl@tmpbox}{%
            {\recipenumberfont\arabic{r@cipenumber}\ \ }%
          }%
          \setlength{\R@cipeNumberWidth}{\wd\titl@tmpbox}%
          \addtolength{\R@cipeTitleWidth}{-\R@cipeNumberWidth}%
          \addtolength{\R@cipeTandSWidth}{-\R@cipeNumberWidth}%
          \lineskip0pt\mbox{}\\[-\baselineskip]%
          \parbox[b]{\R@cipeNumberWidth}{%
            \rule{0pt}{\baselineskip}%
            \strut\usebox{\titl@tmpbox}%
            \strut%
          }%
          \makebox[\R@cipeTandSWidth][t]{%
            \parbox[t]{\R@cipeTandSWidth}{%
              \lineskip0pt\mbox{}\\[-\baselineskip]%
              \parbox[b]{\R@cipeTitleWidth}{%
                \rule{0pt}{\baselineskip}%
                \strut{\recipetitlefont #1}\strut\hfill}%
              \parbox[b]{\R@cipeServingsWidth}{%
                \strut{\hfill\recipeservingsfont #2}\strut}%
            }%
          }%
          \addtolength{\R@cipeTandSWidth}{\R@cipeNumberWidth}%
          \addtolength{\R@cipeTitleWidth}{\R@cipeNumberWidth}%
        \else%
          \lineskip0pt\mbox{}\\[-\baselineskip]%
          \parbox[b]{\R@cipeTitleWidth}{%
            \rule{0pt}{\baselineskip}%
            \strut{\recipetitlefont #1}\strut\hfill}%
          \parbox[b]{\R@cipeServingsWidth}{%
            \strut{\hfill\recipeservingsfont #2}\strut}%
        \fi%
      }%
    }%
  }\par%
%%  \nopagebreak
%%  \vspace{\R@cipeTitleVerticalAdjustTop}%
  \nopagebreak
  \rule[-\R@cipeTitleVerticalAdjustTop]{\R@cipeWidth}{0.4pt}\par%
  \nopagebreak
  \vskip\R@cipeTitleVerticalAdjustBot%
%%  \vspace{\R@cipeTitleVerticalAdjustBot}%
  \nopagebreak
  \ifx\relax#3\relax%
  \else
    \makebox[\R@cipeWidth][r]{\recipetimefont #3}\par%
  \fi
  \nopagebreak
}%
\def\r@cipesloppy{%
  \tolerance 9999%
  \emergencystretch 3em%
  \hfuzz.5pt%
  \vfuzz.5pt%
  \hbadness 1500%
}%
\DeclareRobustCommand{\pr@ingred}{%
  \endminipage\end{lrbox}%
  \ifdim\wd\st@pmethodbox=0in%
  \else%
    \DisplaySt@p%
  \fi%
}%
\DeclareRobustCommand{\p@stingred}{%
  \fr@eformingfalse%
  \begin{lrbox}{\st@pmethodbox}\minipage[t]{\R@cipeMethodWidth}%
  \recipemethodfont%
  \noindent%
  \ignorespaces%
  \r@cipesloppy%
}%
\DeclareRobustCommand{\m@thodend}{%
  \endminipage\end{lrbox}%
  \ifdim\wd\st@pmethodbox=0in%
    \ifnum\value{ingr@dnumber}>0%
      \savebox{\st@pmethodbox}[\R@cipeMethodWidth]{\mbox{}}%
      \DisplaySt@p%
    \fi%
  \else%
    \DisplaySt@p%
  \fi%
  \p@stingred%
}%
\DeclareRobustCommand\r@cipen@wpage{\global\n@wpagingtrue\m@thodend}
\DeclareRobustCommand{\fr@eform}{%
  \endminipage\end{lrbox}%
  \ifdim\wd\st@pmethodbox=0in%
    \ifnum\value{ingr@dnumber}>0%
      \savebox{\st@pmethodbox}[\R@cipeMethodWidth]{\mbox{}}%
       \DisplaySt@p%
    \fi%
  \else%
    \DisplaySt@p%
  \fi%
  \fr@eformingtrue%
  \begin{lrbox}{\st@pmethodbox}\minipage[t]{\R@cipeWidth}%
  \recipefreeformfont%
  \noindent%
  \ignorespaces%
  \r@cipesloppy%
}%
\DeclareRobustCommand{\ingr@dient}[3][]{%
  \pr@ingred%
  \ifx\relax#1\relax%
    \savebox{\st@pIQUbox}[\R@cipeIQUWidth][t]{%
      \parbox[t]{\R@cipeIQUWidth}{%
        \lineskip0pt\mbox{}\\[-\baselineskip]%
        \rule{\R@cipeOutdent}{0cm}%
        \parbox[b]{\R@cipeQandUWidth}{%
          \raggedright\recipeunitfont%
          \setlength{\parindent}{-\R@cipeOutdent}%
          \savebox{\st@pingrtmpbox}{#2}%
          \ifdim\wd\st@pingrtmpbox>\R@cipeQandUWidth%
            \rule{0pt}{\baselineskip}%
            \strut #2\strut%
          \else%
            \noindent%
            \rule{0pt}{\baselineskip}%
            \strut #2\hfill\strut%
          \fi%
        }%
        \rule{\R@cipeIngUISpace}{0cm}%
        \rule{\R@cipeOutdent}{0cm}%
        \parbox[t]{\R@cipeIngredientWidth}{\raggedright%
          \recipeingredientfont%
          \setlength{\parindent}{-\R@cipeOutdent}%
          \strut #3\strut}%
      }%
    }%
  \else
    \savebox{\st@pingrtmpbox}[\R@cipeIandUWidth][t]{%
      \parbox[t]{\R@cipeIandUWidth}{%
        \lineskip0pt\mbox{}\\[-\baselineskip]%
        \rule{\R@cipeOutdent}{0cm}%
        \parbox[b]{\R@cipeUnitsWidth}{%
          \raggedright\recipeunitfont%
          \setlength{\parindent}{-\R@cipeOutdent}%
          \rule{0pt}{\baselineskip}%
          \strut #2\strut\hfill}%
        \rule{\R@cipeIngUISpace}{0cm}%
        \rule{\R@cipeOutdent}{0cm}%
        \parbox[t]{\R@cipeIngredientWidth}{%
          \raggedright\recipeingredientfont%
          \setlength{\parindent}{-\R@cipeOutdent}%
          \strut #3\strut}%
      }%
    }%
    \savebox{\st@pIQUbox}[\R@cipeIQUWidth][t]{%
      \parbox[t]{\R@cipeIQUWidth}{%
        \lineskip0pt\mbox{}\\[-\baselineskip]%
        \parbox[b]{\R@cipeQuantityWidth}{\rule{0pt}{\baselineskip}%
          \hfill %
          \raggedright\recipequantityfont%
          \strut #1\strut%
          \rule{\R@cipeIngQUSpace}{0cm}}%
        \usebox{\st@pingrtmpbox}%
      }%
    }%
  \fi%
  \savebox{\st@pingrtmpbox}[\R@cipeIQUWidth][t]{\usebox{\st@pingrbox}}%
  \savebox{\st@pingrbox}[\R@cipeIQUWidth][t]{%
    \begin{minipage}[t]{\R@cipeIQUWidth}%
        \lineskip0pt%
        \ifnum\value{ingr@dnumber}>0%
          \usebox{\st@pingrtmpbox}\par%
          \usebox{\st@pIQUbox}\strut%
        \else%
          \usebox{\st@pIQUbox}\strut%
        \fi%
    \end{minipage}%
  }%
  \stepcounter{ingr@dnumber}%
  \p@stingred%
}%
\DeclareRobustCommand{\Ingr@dient}[1]{%
  \pr@ingred%
  \savebox{\st@pIQUbox}[\R@cipeSingleIngWidth][t]{%
    \parbox[t]{\R@cipeSingleIngWidth}{%
      \lineskip0pt\mbox{}\\[-\baselineskip]%
      \rule{\R@cipeOutdent}{0cm}%
      \parbox[t]{\R@cipeSingleIngWidth}{\raggedright%
        \recipeingredientfont%
        \setlength{\parindent}{-\R@cipeOutdent}%
        \strut #1\strut}%
    }%
  }%
  \savebox{\st@pingrtmpbox}[\R@cipeIQUWidth][t]{\usebox{\st@pingrbox}}%
  \savebox{\st@pingrbox}[\R@cipeIQUWidth][t]{%
    \begin{minipage}[t]{\R@cipeIQUWidth}%
        \lineskip0pt%
        \ifnum\value{ingr@dnumber}>0%
          \usebox{\st@pingrtmpbox}\par%
          \usebox{\st@pIQUbox}\strut%
        \else%
          \usebox{\st@pIQUbox}\strut%
        \fi%
    \end{minipage}%
  }%
  \stepcounter{ingr@dnumber}%
  \p@stingred%
}%
\newenvironment{recipe}[4][]{%
  \refstepcounter{r@cipenumber}
  \ifx\relax#1\relax
  \else
    \label{#1}
  \fi
  \let\label\relax
  \let\newstep\m@thodend
  \let\recipen@wpage\newpage
  \let\newpage\r@cipen@wpage
  \let\0\d@grees
  \let\X\tim@s
  \let\degrees\d@grees
  \let\fr\fr@ction
  \let\ing\ingr@dient
  \let\ingredient\ingr@dient
  \let\Ing\Ingr@dient
  \let\Ingredient\Ingr@dient
  \let\freeform\fr@eform
  \n@wpagingfalse%
  \setlength{\parindent}{0pt}
  \savebox{\st@pingrbox}[\R@cipeIQUWidth]{}
  \savebox{\st@pmethodbox}[\R@cipeMethodWidth]{}

  \bigskip\medskip
  \pagebreak[0]
  \parskip0pt%
  \ifc@ntentsing%
     \addcontentsline{toc}{subsection}{#2}%
  \fi%
  \ifind@xing%
     \index{#2 (\arabic{r@cipenumber})}%
  \fi%
  \nopagebreak%
  \r@cipetitle{#2}{#3}{#4}
  \vskip0.2cm%
  \p@stingred%
}%
{%
  \pr@ingred%
  \ifnum\value{st@pnumber}=0%  then complain!
    \PackageWarning{cuisine}{The recipe did not have any steps}%
  \fi%

  \pagebreak[0]%
  \medskip%
  \@endpetrue%
}%
\DeclareRobustCommand{\d@grees}{%
  ${}^\circ$%
}%
\DeclareRobustCommand{\tim@s}{%
  \relax${}\times{}$\relax%
}%
\DeclareRobustCommand{\fr@ction}[2]{%
  \nicefrac#1#2%
}%
\endinput%
\endinput
%%
%% End of file `cuisine.sty'.
