\documentclass[%
a4paper,
%twoside,
11pt
]{article}

% encoding, font, language
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman, english]{babel}

\usepackage{nicefrac}

\usepackage[
    handwritten,
    nowarnings,
    %myconfig
]
{xcookybooky}

\usepackage{blindtext}    % only needed for generating test text

\definecolor{mygreen}{rgb}{0,.5,0}
\DeclareRobustCommand{\textcelcius}{\ensuremath{^{\circ}\mathrm{C}}}

\setRecipeColors
{%
    recipename = mygreen,
    ing = blue,
    inghead = blue,
    prep,
    prephead,
    hint,
    hinthead,
}

\setcounter{secnumdepth}{1}
\renewcommand*{\recipesection}[2][]
{%
    \subsection[#1]{#2}
}
\renewcommand{\subsectionmark}[1]
{% no implementation to display the section name instead
}


%%%%%%%%%%
% hyperref
\usepackage{hyperref}    % must be the last package
\hypersetup{%
    pdfauthor            = {Sven Harder},
    pdftitle             = {Example Recipes},
    pdfsubject           = {Recipes},
    pdfkeywords          = {recipes},
    pdfstartview         = {FitV},             
    pdfview              = {FitH},
    pdfpagemode          = {UseNone}, % Options; UseNone, UseOutlines
    bookmarksopen        = {true},
    pdfpagetransition    = {Glitter},
    colorlinks           = {true},
    linkcolor            = {black}, 
    urlcolor             = {black}
    citecolor            = {black}, 
    filecolor            = {black},
}
% hyperref
%%%%%%%%%%



\begin{document}

\title{Examples for using \textbf{xcookybooky}}
\author{Sven Harder}
\maketitle

\begin{center}
    The examples in this document are using the version 1.2 of \texttt{xcookxbooky}.
\end{center}

\tableofcontents

\vspace{9em}

\section{Recipes}
The following recipe is an example for the usage of the \texttt{xcookybooky} package. The copyright of the pictures is owned by Roman Gaus.

\newpage

% background graphic
\setBackgroundPicture[x, y=-2cm, width=\paperwidth-4cm, height, orientation = pagecenter]
{pic/background}

\begin{recipe}
[ % 
    preparationtime = {\unit[1]{h}},
    bakingtime,
    bakingtemperature,
    portion = {\portion{5}},
    calory,
    source = R. Gaus
]
{Mousse au Chocolat}
    
    \graph
    {% pictures
        small=pic/glass,     % small picture
        big=pic/ingredients  % big picture
    }
    
    \ingredients
    {%
        2 Tafeln & dunkle Schokolade (über \unit[70]{\%})\\
        3        & Eier\\
        \unit[200]{ml} & Sahne\\
        \unit[40]{g} & Zucker\\
        \unit[50]{g} & Butter
    }
    
    \preparation
    {%
        \step Eier trennen, Eiweiß und Sahne separat steif schlagen. Butter und Schokolade vorsichtig im Wasserbad schmelzen.
        \step Eigelb in einer großen Schüssel mit \unit[2]{EL} heißem Wasser cremig schlagen, den Zucker einrühren bis die Masse hell und cremig ist.
        \step Die geschmolzene Schokolade unterheben, anschließend sofort Eischnee und Sahne unterheben (nicht mit dem Elektro-Mixer!)
        \step Mindestens 2 Stunden im Kühlschrank kalt stellen. Aber nicht zu kalt servieren.
    }
    
    \hint
    {%
        Der Schokoladenanteil kann auch gesenkt werden.
    }

\end{recipe}

\newpage % if you separate your recipes into single files this command is not necessary


\begin{recipe}
[ % 
    preparationtime = {\unit[1]{h}},
    bakingtime={\unit[1]{h}},
    bakingtemperature={\protect\bakingtemperature{fanoven=\unit[230]{\textcelcius}, topbottomheat=\unit[195]{°C}, topheat=\unit[195]{°C}, gasstove=Stufe 2}},
    portion = {\portion{5-6}},
    calory={\unit[3]{kJ}},
    source = somebody
]
{Test Recipe}
    
    \graph
    {% pictures
        small=pic/glass,     % small picture
        big=pic/ingredients  % big picture
    }
    
    \ingredients
    {%
        2 Tafeln & dunkle Schokolade (über \unit[70]{\%})\\
        3 &  Eier\\
        200 ml & Sahne\\
        40 g & Zucker\\
        50 g & Butter
    }
    
    \preparation
    {%
        \step This recipe is intended to show you more display options.
        \step Test, Test, Test, Test, Test, Test, Test, Test, Test, Test, Test, Test
        \step Another Test, Test, Test, Test. And once again Test, Test, Test, Test
        \step \blindtext
        \step You maybe don't need a hint
    }

\end{recipe}



\newpage


\begin{recipe}
[ % 
    preparationtime = {\unit[1]{h}},
    bakingtime={\unit[1]{h}},
    bakingtemperature={\protect\bakingtemperature{fanoven=\unit[230]{\textcelcius}, topbottomheat=\unit[195]{°C}, topheat=\unit[195]{°C}, gasstove=Stufe 2}},
    portion = {\portion{5-6}},
    calory={\unit[3]{kJ}},
    source = someone else
]
{Test Recipe Number 2}
    
    \graph
    {% pictures
        small,
        big
    }
    
    \ingredients
    {%
        2 Tafeln & dunkle Schokolade (über \unit[70]{\%})\\
        3 & Eier\\
        200 ml & Sahne\\
        40 g & Zucker\\
        50 g & Butter
    }
    
    \preparation
    {%
        \step The same recipe as before, but showing the result if you do not insert pictures.
        \step Please note also that the overlong ingredient creates a line break.
        \step Test, Test, Test, Test, Test, Test, Test, Test, Test, Test, Test, Test
        \step Another Test, Test, Test, Test. And once again Test, Test, Test, Test
        \step \blindtext
        \step You maybe want this time an \textbf{empty hint}.
    }
    
    \hint{}

\end{recipe}


\newpage


\begin{recipe}
[ % 
    preparationtime = {\unit[1]{h}},
    bakingtime,
    bakingtemperature,
    portion = {\portion{5}},
    calory,
    source = R. Gaus
]
{Test Recipe Number 3}
    
    \graph
    {% pictures
        small=pic/glass,     % small picture
        big=pic/ingredients  % big picture
    }
    
    \ingredients
    {%
        2 Tafeln & dunkle Schokolade\\
                 & (über \unit[70]{\%})\\
        3        & Eier\\
        \unit[200]{ml} & Sahne\\
        \unit[40]{g} & Zucker\\
        \unit[50]{g} & Butter
    }
    
    \preparation
    {%
        \step \blindtext
        \step \blindtext
        \step \blindtext
    }
    
    \hint
    {%
        Note that this hint is shown at the top of this (second) page. This allows you a clear view at the beautiful background image.
    }

\end{recipe}


\newpage


\begin{recipe}
[ % 
    preparationtime = {\unit[1]{h}},
    bakingtime,
    bakingtemperature,
    portion = {\portion{5}},
    calory,
    source = R. Gaus
]
{A longer recipe to show you how it will be displayed}
    
    \graph
    {% pictures
        small=pic/glass,     % small picture
        big=pic/ingredients  % big picture
    }
    
    \ingredients
    {%
        \unit[500]{ml} & milk\\
        \unit[40]{g} & butter\\
        \unit[50]{g} & sugar\\
        \unit[50]{g} & something else\\
        \unit[70]{g} & something else\\
        \unit[50]{g} & something else\\
        \unit[50]{g} & something else\\
        \multicolumn{2}{c}{\textbf{Heading}}\\
        \unit[50]{g} & something else\\
        \unit[50]{g} & something else\\
        \unit[5000]{g} & something else\\
        \unit[50]{g} & something else\\
        \unit[50]{g} & something else\\
        \unit[50]{g} & something else\\
        \\
        \multicolumn{2}{c}{\textbf{Soße}} \\
        \unit[100]{ml} & Sahne\\
        \unit[50]{g} & something else\\
        \unit[50]{g} & something else\\
        \unit[50]{g} & something else\\
    }
    
    \preparation
    {%
        \step You can also use headings to structure your ingredients! And unfortunately you can see on second page of this recipe that not all packages are working with each other (see the white space that is left free). 
        \step \blindtext
        \step \blindtext
        \step \blindtext
    }
    
    \hint
    {%
        Enjoy typesetting recipes with {\textbf{\Large\LaTeX}} and {\textbf{\Large xcookybooky!}}
    }

\end{recipe}

\newpage


\begin{recipe}
[ % 
    preparationtime = {\unit[1]{h}},
    bakingtime,
    bakingtemperature,
    portion = {\portion{5}},
    calory,
    source = R. Gaus
]
{A really long recipe!}
    
    \graph
    {% pictures
        small=pic/glass,     % small picture
        big=pic/ingredients  % big picture
    }
    
    \ingredients
    {%
        \unit[500]{ml} & milk\\
        \unit[40]{g} & butter\\
        \unit[50]{g} & sugar\\
        \unit[50]{g} & something else\\
        \unit[70]{g} & something else\\
        \unit[50]{g} & something else\\
        \unit[250]{g} & something else\\
        \unit[50]{g} & something else\\
        \multicolumn{2}{c}{\textbf{Heading}}\\
        \unit[50]{g} & something else\\
        \unit[50]{g} & something else\\
        \unit[5000]{g} & something else\\
        \unit[50]{g} & something else\\
        \unit[50]{g} & something else\\
        \unit[50]{g} & something else\\
        \\
        \multicolumn{2}{c}{\textbf{Soße}} \\
        \unit[100]{ml} & Sahne\\
        \unit[50]{g} & something else\\
        \unit[50]{g} & something else\\
    }
    
    \preparation
    {%
        \step You can also use headings to structure your ingredients!
        \step \blindtext
        \step \blindtext
        \step \blindtext
        \step \blindtext
        \step \blindtext
        \step \blindtext
        \step \blindtext
        \step \blindtext
        \step \blindtext
        \step And your recipe can of course even be longer (if your really need it). But it shows at least the principle.
    }
    
    \hint
    {%
        Enjoy typesetting recipes with {\textbf{\Large\LaTeX}} and {\textbf{\Large xcookybooky!}}
    }

\end{recipe}


\end{document} 