summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-12-31 22:32:11 +0000
committerKarl Berry <karl@freefriends.org>2011-12-31 22:32:11 +0000
commit2d01ba9fbe65f6614c49376eca6d14968d2a04d3 (patch)
tree8c880f792a28bd38f7601e2ee9cedef76c5c040e /Master/texmf-dist
parent3566a5e9a7bfcd5ad94bcd8a42e14d35914ca971 (diff)
xcookybooky (31dec11)
git-svn-id: svn://tug.org/texlive/trunk@24988 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/xcookybooky/README51
-rw-r--r--Master/texmf-dist/doc/latex/xcookybooky/example/example.pdfbin0 -> 331924 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xcookybooky/example/example.tex167
-rw-r--r--Master/texmf-dist/doc/latex/xcookybooky/example/pic/background.pdfbin0 -> 88626 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xcookybooky/example/pic/glass.jpgbin0 -> 23763 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xcookybooky/example/pic/ingredients.jpgbin0 -> 26418 bytes
-rw-r--r--Master/texmf-dist/doc/latex/xcookybooky/xcookybooky.pdfbin0 -> 643579 bytes
-rw-r--r--Master/texmf-dist/source/latex/xcookybooky/xcookybooky.dtx1143
-rw-r--r--Master/texmf-dist/source/latex/xcookybooky/xcookybooky.ins62
-rw-r--r--Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.cfg63
-rw-r--r--Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.sty623
11 files changed, 2109 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/xcookybooky/README b/Master/texmf-dist/doc/latex/xcookybooky/README
new file mode 100644
index 00000000000..cc0ca66f20a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xcookybooky/README
@@ -0,0 +1,51 @@
+'xcookybooky' is a package for entering recipes
+and layout them in a nice way. This package is
+based on the 'cookybooky' package by Jürgen Gilg.
+Unfortunately it uses some special packages and
+fonts. Another handycap is missing possibility to
+create a PDF directly. This limitations are reversed.
+
+As a result of the changes not all options known
+from 'cookybooky' are implemented in this package.
+But nevertheless it provides some new options, e.g.
+an improved color and fontsize management and more
+recipe fields.
+
+
+Usage
+----------------------------------
+The recipes are inserted in a environment. There is
+the possibility to enter ingredients, preparation (steps),
+(two) pictures and a hint. Also there is an option
+to insert the recipetime, bakingtime, portions, calory
+content and source of the recipe (internet, friends,
+neighbours etc.).
+
+
+Package contents
+----------------------------------
+The current distribution is zipped up as
+ 'xcookybooky.zip'
+and includes the following files
+ 'xcookybooky.ins',
+ 'xcookybooky.dtx',
+ 'xcookybooky.pdf',
+ 'README'.
+Also there is a folder including an example, which
+helps you (hopefully) to understand the usage of this
+package.
+
+
+License
+----------------------------------
+This package may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in:
+
+http://www.latex-project.org/lppl.txt
+
+
+Current maintainer
+----------------------------------
+Sven Harder \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/xcookybooky/example/example.pdf b/Master/texmf-dist/doc/latex/xcookybooky/example/example.pdf
new file mode 100644
index 00000000000..89a5b9d74b0
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xcookybooky/example/example.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xcookybooky/example/example.tex b/Master/texmf-dist/doc/latex/xcookybooky/example/example.tex
new file mode 100644
index 00000000000..c6db5b02b37
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xcookybooky/example/example.tex
@@ -0,0 +1,167 @@
+\documentclass[%
+a4paper,
+%twoside,
+11pt
+]{article}
+
+% encoding, font, language
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage{lmodern}
+\usepackage[ngerman, english]{babel}
+
+\usepackage{nicefrac}
+
+\usepackage{xcookybooky}
+
+\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}
+}
+
+
+%%%%%%%%%%
+% hyperref
+\usepackage{hyperref} % must be the last package
+\hypersetup{%
+ pdfauthor = {Your name},
+ pdftitle = {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{Your Recipes}
+\author{Your Name}
+\maketitle
+
+\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\\
+ \unit[200]{ml} & Sahne\\
+ \unit[40]{g} & Zucker\\
+ \unit[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 You maybe don't need a hint
+ }
+
+
+
+\end{recipe}
+
+
+
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/xcookybooky/example/pic/background.pdf b/Master/texmf-dist/doc/latex/xcookybooky/example/pic/background.pdf
new file mode 100644
index 00000000000..635996f2595
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xcookybooky/example/pic/background.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xcookybooky/example/pic/glass.jpg b/Master/texmf-dist/doc/latex/xcookybooky/example/pic/glass.jpg
new file mode 100644
index 00000000000..427884c4a3c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xcookybooky/example/pic/glass.jpg
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xcookybooky/example/pic/ingredients.jpg b/Master/texmf-dist/doc/latex/xcookybooky/example/pic/ingredients.jpg
new file mode 100644
index 00000000000..c54b0b0873a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xcookybooky/example/pic/ingredients.jpg
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/xcookybooky/xcookybooky.pdf b/Master/texmf-dist/doc/latex/xcookybooky/xcookybooky.pdf
new file mode 100644
index 00000000000..d242df0940c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/xcookybooky/xcookybooky.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/xcookybooky/xcookybooky.dtx b/Master/texmf-dist/source/latex/xcookybooky/xcookybooky.dtx
new file mode 100644
index 00000000000..7ebc94b01a7
--- /dev/null
+++ b/Master/texmf-dist/source/latex/xcookybooky/xcookybooky.dtx
@@ -0,0 +1,1143 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2011 by Sven Harder
+% -----------------------------------
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% \fi
+%
+% \iffalse
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{xcookybooky}
+%<package> [2011/12/29 v1.0 Easy typesetting (long) recipes with pictures]
+%<config>\ProvidesFile{xcookybooky.cfg}
+%<config> [2011/12/29 v1.0 'xcookybooky' configuration]
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage{lmodern}
+\usepackage{xcookybooky}
+\usepackage{units}
+\usepackage{pdfpages}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\addtolength{\textheight}{-1.5cm}
+\addtolength{\oddsidemargin}{0.5cm}
+\setcounter{IndexColumns}{2}
+\usepackage{hyperref}
+\hypersetup{%
+ pdfauthor = {Sven Harder},
+ pdftitle = {xcookybooky documentation},
+ colorlinks = {true},
+ linkcolor = {blue},
+ urlcolor = {blue},
+ citecolor = {blue},
+ filecolor = {blue}
+}
+\begin{document}
+ \DocInput{xcookybooky.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{623}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v1.0}{2011/12/29}{Initial version}
+%
+% \GetFileInfo{xcookybooky.sty}
+%
+% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ ,\"}
+% \DoNotIndex{\@ne}
+% \DoNotIndex{\advance,\begingroup,\catcode,\closein}
+% \DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup}
+% \DoNotIndex{\begin,\end,\equal,\if,\fi,\ifthenelse,\setcounter,\value,\ifx,\ifnum}
+% \DoNotIndex{\RequirePackage}
+% \DoNotIndex{\savekeys,\define,\setkeys,\define@key}
+%
+% \title{The \textsf{xcookybooky} package\thanks{This document
+% corresponds to \textsf{xcookybooky}~\fileversion,
+% dated \filedate.}}
+% \author{Sven Harder \\ \texttt{sven\_one1@gmx.de}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This package is made for typesetting recipes. You simply enter ingredients, preparation steps and get a beautiful recipe page. It is also possible to enter 2 pictures, which are displayes above the name of the recipe. Another option is to write a hint, which is displayed at the bottom.
+% \end{abstract}
+%
+% \vspace{3em}
+%
+% \PrintChanges
+%
+% \newpage
+% \tableofcontents
+% \newpage
+%
+% \section{Introduction}
+%
+% When I was looking for template for recipes, I found the cookybooky package by Jürgen Gilg (http://www.ctan.org/tex-archive/macros/latex/contrib/cookybooky).
+% It looks very good, but I was unable to compile it correctly (e.g. I haven't got the Lucida fonts). Also there are some packages which have to be downloaded by hand, because there are not available at CTAN. Other handycaps are the missing possibility to create a PDF-file directly and a recipe cannot be longer than a single page.
+% So decided to take a look at the code. Step by step I replaced all critical parts. Finally it is now possible to write recipes much easier (at least in my opinion).
+%
+% \section{Comparison between xcookybooky and cookybooky}
+%
+% There is no compatibility between xcookybooky and cookybooky, even the name is associating it. The reason for the naming is nearly similar design.
+%
+% A comparison between \texttt{xcookybooky} and \texttt{cookybooky} is shown in table \ref{tbl:comparison}.
+% \begin{table}[htbp]
+% \centering
+% \begin{tabular}{rll}
+% \textbf{Characteristic} & \textbf{xcookybooky} & \textbf{cookybooky}\\
+% Maximum recipe length & unlimited & 1 page\\
+% Support missing pictures & yes & no\\
+% Transparent background graphic & not part of package (see section \ref{sec:background}) & yes\\
+% Main Layout & wraptable & minipages\\
+% Support twoside option & only changing pictures above & full\\
+% Generate recipe & environment & macro\\
+% \end{tabular}
+% \caption{Comparison between xcookybooky and cookybooky}
+% \label{tbl:comparison}
+% \end{table}
+% \newpage
+%
+% \section{Usage}
+% First I want to explain the most important macros. After this you should be able to insert recipes. Afterwards some macros are shown, which allows you to modify the design (e.g. colors, headlines).
+%
+% \DescribeEnv{recipe}
+% This the environment to insert recipes. Each recipe is included in a single enviroment. It is necessary to enter the name of the recipe. It is possible to insert also the recipetime, the portions, the calory content and the source (where you get this recipe).
+%
+% Example:
+% \begin{verbatim}
+% \begin{recipe}[
+% preparationtime = 30 min,
+% bakingtime = 1 hour,
+% bakingtemperature = \unit[225]{°C},
+% portion = 4 portions,
+% calory = 4 kj,
+% source = My neighbour Sarah
+% ]{Currywurst}
+% ...
+% \end{recipe}
+% \end{verbatim}
+%
+% \DescribeMacro{\graph}
+% It is possible to set 2 pictures by the macro \texttt{graph}. They are displayed above the other content. If no pictures are set, the space is used by the other content. The \texttt{big} picture should be bigger than the \texttt{small} picture ;)
+%
+% Example:
+% \begin{verbatim}
+% \graph{
+% small = strawberry,
+% big = strawberrycake
+% }
+% \end{verbatim}
+%
+% \DescribeMacro{\ingredients}
+% Here the ingredients of your recipe are set. They should be entered by number (unit) \& ingredient. If the unit is a SI-Unit, it looks better if you use the \texttt{units} package instead of a blank.
+%
+% Example:
+% \begin{verbatim}
+% \ingredients{
+% 2 Tafeln & dunkle Schokolade\\
+% & (über \unit[70]{\%})\\
+% 3 & Eier\\
+% \unit[200]{ml} & Sahne\\
+% \unit[40]{g} & Zucker\\
+% \unit[50]{g} & Butter
+% }
+% \end{verbatim}
+%
+% \DescribeMacro{\preparation}
+% The preparation steps are inserted by this macro. Every step is written after \texttt{step} command. This is necessarry for the numeration.
+%
+% Example:
+% \begin{verbatim}
+% \preparation{
+% \step This is the first step for cooking a brilliant meal.
+% \step The second step follows...
+% \step and so on
+% \step Enjoy your meal!
+% }
+% \end{verbatim}
+%
+% \DescribeMacro{\portion}
+% This macro is intented as an interface for an equal formating of portions entries. For this it can be easily modified. You just have to renew this command.
+%
+% \DescribeMacro{\bakingtemperature}
+% This macro allows you to enter some bakingtemperatures. If you do not like the order of the temperatures you can change them by redefining the command. The temperatures are inserted as key/value pairs as known from the \texttt{xkeyval} package.
+%
+% Example (an entry in options of an recipe):
+% \begin{verbatim}
+% \begin{recipe}
+% [
+% bakingtemperature={\protect\bakingtemperature{fanoven=\unit[230]{°C},
+% topbottomheat=\unit[195]{°C}, topheat=\unit[195]{°C}, bottomheat, gasstove=Stufe 2}}
+% ]{Currywurst}
+% \end{recipe}
+% \end{verbatim}
+%
+% \subsection{Modify design}
+% The following macros can be used outside the recipe environment to choose your personal color etc.
+%
+% \DescribeMacro{\setRecipeColors}
+% If you want to change the default colors, you can use \texttt{setRecipeColors}. The colors are set by <key~=~value> as known by the \texttt{xkeyval} package. The names of colors can be found in table \ref{tbl:colormanagement}. New colors can be easiliy defined by the \texttt{xcolor} package as shown the example below.
+% \begin{table}[htbp]
+% \centering
+% \begin{tabular}{rcl}
+% \textbf{key}& \textbf{default value} & \textbf{description}\\
+% recipename & green & recipe name\\
+% ing & gray & ingredients (text)\\
+% inghead & gray & headline of the ingredients\\
+% prep & black & preparation (text)\\
+% prephead & black & headline of the preparation\\
+% hint & red & hint (text)\\
+% hinthead & red & headline of the hint\\
+% hintline & red & lines leftside the hint text (cross)\\
+% numeration & red & numeration of the preparation steps\\
+% \end{tabular}
+% \caption{Color Management}
+% \label{tbl:colormanagement}
+% \end{table}
+%
+% \begin{samepage}
+% Example:
+% \begin{verbatim}
+% \definecolor{webgreen}{rgb}{0,.5,0}
+%
+% \setRecipeColors{
+% recipename = webgreen,
+% ing = blue,
+% numeration = black,
+% }
+% \end{verbatim}
+% \end{samepage}
+%
+% \DescribeMacro{\setRecipeSizes}
+% The macro \texttt{setRecipeSizes} enables you to modify the fontsize of many parts of the recipe. The sizes are inserted by <key~=~value> (\texttt{xkeyval}).
+%
+% Example (these are the default values):
+% \begin{verbatim}
+% \setRecipeSizes{
+% recipename = \fontsize{24pt}{30pt},
+% ing = \normalsize,
+% inghead = \normalsize,
+% prep = \normalsize,
+% prephead = \normalsize,
+% hint = \normalsize,
+% hinthead = \Large
+% }
+% \end{verbatim}
+%
+% \DescribeMacro{\setRecipenameFont}
+% The name of recipe is displayed with a handwritten font by default. In my opinion it looks much better than a standard font. But if you want to change it you can use this macro. A well-arranged list of fonts can be found at \texttt{http://www.tug.dk/FontCatalogue/}. The other parameters are fontencoding, fontseries and fontshape. The size is changed by \texttt{setRecipeSizes}.
+%
+% Example (some fonts you could try out):
+% \begin{verbatim}
+% \setRecipenameFont{
+% % pbsi
+% % fau
+% % fwb
+% fjd % default
+% }{T1}{m}{n}
+% \end{verbatim}
+%
+% \subsection{Translation}
+% \DescribeMacro{\setHeadlines}
+% \texttt{setHeadlines} allows to modify the default headlines. This is also needed for translations (The default values are german, sorry).
+% The headlines are also inserted in <key~=~value> form.
+%
+% Example (a possible english translation):
+% \begin{verbatim}
+% \setHeadlines{
+% inghead = Ingredients,
+% prephead = Preparation,
+% hinthead = Hint,
+% calory = energy content,
+% continuationhead = Continuation,
+% continuationfoot = Continuation on next page
+% }
+% \end{verbatim}
+%
+%
+% \subsection{Background graphic}
+% \label{sec:background}
+% Inside this package there is only the option to set a background picture using the \texttt{setBackgroundPicture} macro.
+% For creating transparent backgrounds I recommand \textbf{Inkscape}\footnote{http://inkscape.org/}. You just have to import a picture and reduce the opacity of the picture (I prefer \unit[22]{\%}).
+% The possible options for the orientation are: default, pagecenter, textcenter or stockcenter. To modify these orientations you have the possibility to change it manually by setting the \texttt{x} and \texttt{y} option (as shown below).
+%
+% Example:
+% \begin{verbatim}
+% \setBackgroundPicture
+% [%
+% x = 2cm,
+% y = -1cm,
+% width=\paperwidth-3cm,
+% height,
+% orientation=pagecenter
+% ]{pic/bg_transparent} % filepath
+% \end{verbatim}
+%
+% \newpage
+% \IfFileExists{example/example.pdf}
+% {
+% \section{Example}
+% \begin{minipage}{\textheight}
+% \includepdf[pages={2}, scale=0.86]{example/example.pdf}
+% \end{minipage}
+% \newpage
+% }{}
+%
+% \section{Troubleshooting}
+% \subsection{MiKTeX}
+% If you have problems with the used fonts (e.g. \texttt{cookingsymbols}) it might be necessary to refresh the database of MiKTeX.
+%
+% \section{Bugs}
+% If you found a bug, which is not described in the following section, feel free to write me an email. It can be found at the titlepage.
+%
+% \subsection{Known issues}
+% The \texttt{wrapfig} package has some problems with enumerations and the \texttt{lettrine} package. This is the reason, why some warnings are generated by compiling (the example). But nevertheless the results looks quite well, so I decided to ignore this issue.
+% By using \texttt{wrapfig} it is not possible to switch ingredients and preparation (the result looks really ugly). This is the reason, why the layout is not changed when setting the \texttt{twoside} option in the document class. I also tried \texttt{parcolumns} and \texttt{parallel}, but the results were disappointing. If you want to use this feature, you have to use \texttt{cookybooky}.
+%
+% Another limitation is the length of the ingredients. The maximum length is one page, because the \texttt{wrapfigure} package does not work with \texttt{longtable}. As a result no pagebreak in the ingredients is possible.
+% \StopEventually{\PrintIndex}
+%
+% \section{Implementation}
+% Let's have a look at the implementation.
+%
+% \subsection{Options}
+% You can use the option \texttt{myconfig} to load your personal configuration (file). See section \ref{sec:configuration}
+% \begin{macrocode}
+%<*package>
+\DeclareOption{myconfig}
+{% load personal configuration
+ \AtEndOfPackage{
+ \InputIfFileExists{xcookybooky.cfg}
+ {\PackageInfo{xcookybooky}{inputting 'xcookybooky.cfg'}}
+ {\PackageWarning{xcookybooky}{cannot find the configuration file 'xcookybooky.cfg'}}
+ }
+}
+\ProcessOptions\relax
+
+% \end{macrocode}
+%
+% \subsection{Required Packages}
+% All needed packages are available at CTAN and as far as I know no general driver limitation are given.
+% \begin{macrocode}
+\RequirePackage{tikz} % for creating the lines for the hint
+\RequirePackage{graphicx}
+\RequirePackage{xcolor}
+\RequirePackage{emerald} % Handwritten Fonts
+\RequirePackage[clock, misc, weather]{ifsym} % Symbolpackage e.g. \Interval, \Wecker etc
+\RequirePackage{cookingsymbols} % Cookings symbols e.g. \Oven, \Dish etc
+\RequirePackage{wrapfig} % To wrap the tabular with the ingredients
+
+\RequirePackage{ifthen}
+\RequirePackage{xkeyval}
+\RequirePackage{lettrine} % numbering the preparation steps
+\RequirePackage{fancyhdr}
+\RequirePackage{units}
+\RequirePackage{eso-pic} % for background pictures
+\RequirePackage{picture} % for modfifying the position of the bg pictures
+
+% \end{macrocode}
+%
+% \subsection{Page Layout}
+% This will set up the page. It is optimized for the documentclass \texttt{article}. If you use a other package you probably have to modify this.
+%
+% \textbf{Note:} I tried to use the KOMA class \texttt{scrartcl}, but unfortunately some strange effects occured.
+% \begin{macrocode}
+\setlength{\parindent}{0cm}
+\setlength{\parskip}{2ex plus 0.5ex}
+
+\setlength{\textwidth}{15.5cm}
+\setlength{\textheight}{24.0cm}
+\setlength{\topmargin}{-0.8cm}
+\setlength{\headheight}{12pt} %0cm
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0cm}
+\setlength{\footskip}{1.4cm}
+\setlength{\evensidemargin}{-0.5cm}
+\setlength{\oddsidemargin}{0.5cm}
+\setlength{\voffset}{0cm}
+\setlength{\hoffset}{0cm}
+\setcounter{secnumdepth}{2} % subsubsections not numbered
+\setcounter{tocdepth}{3} % subsubsections in the .toc file
+
+% \end{macrocode}
+%
+% \begin{macro}{\recipesection}
+% The macro \texttt{recipesection} allows to modify the entry in the table of contents.
+% \textbf{Note:} If you modify the macro you may change the two upper lines as well.
+% \begin{macrocode}
+\newcommand*{\recipesection}[2][]
+{%
+ \subsubsection[#1]{#2}
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Color Management}
+% Below the (default) colors are defined using the \texttt{xkeyval} package.
+% \begin{macrocode}
+\define@key{colorManagement}{recipename}[green]{\def\xcb@color@recipename{#1}}
+\define@key{colorManagement}{ing}[gray]{\def\xcb@color@ing{#1}}
+\define@key{colorManagement}{inghead}[gray]{\def\xcb@color@inghead{#1}}
+\define@key{colorManagement}{prep}[black]{\def\xcb@color@prep{#1}}
+\define@key{colorManagement}{prephead}[black]{\def\xcb@color@prephead{#1}}
+\define@key{colorManagement}{hint}[black]{\def\xcb@color@hint{#1}}
+\define@key{colorManagement}{hinthead}[red]{\def\xcb@color@hinthead{#1}}
+\define@key{colorManagement}{hintline}[red]{\def\xcb@color@hintline{#1}}
+\define@key{colorManagement}{numeration}[red]{\def\xcb@color@numeration{#1}}
+\savekeys{colorManagement}
+{%
+ recipename, % color of recipename
+ ing, % color of ingredients (text)
+ inghead, % color of headline of ingredients
+ prep, % color of preparation (text)
+ prephead, % color of headline of preparation
+ hint, % color of hint (text)
+ hinthead, % color of headline of hint
+ hintline, % color of lines of hint
+ numeration % color of numeration (preparation)
+}
+
+% \end{macrocode}
+%
+% \begin{macro}{\setRecipeColors}
+% The parameter are set in the form "key~=~value" as known by the \texttt{xkeyval} package.
+% \begin{macrocode}
+\newcommand*{\setRecipeColors}[1]
+{%
+ \setkeys{colorManagement}{#1}
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% This is the initialisation of all required recipe colors.
+% \begin{macrocode}
+\setRecipeColors
+{% initialisation
+ recipename,
+ ing,
+ inghead,
+ prep,
+ prephead,
+ hint,
+ hinthead,
+ hintline,
+ numeration
+}
+
+% \end{macrocode}
+% \subsection{Size Management}
+% Below the (default) sizes are definded.
+% \begin{macrocode}
+\define@key{sizeManagement}{recipename}[\fontsize{24pt}{30pt}]{\def\xcb@fontsize@recipename{#1}}
+\define@key{sizeManagement}{ing}[\normalsize]{\def\xcb@fontsize@ing{#1}}
+\define@key{sizeManagement}{inghead}[\normalsize]{\def\xcb@fontsize@inghead{#1}}
+\define@key{sizeManagement}{prep}[\normalsize]{\def\xcb@fontsize@prep{#1}}
+\define@key{sizeManagement}{prephead}[\normalsize]{\def\xcb@fontsize@prephead{#1}}
+\define@key{sizeManagement}{hint}[\normalsize]{\def\xcb@fontsize@hint{#1}}
+\define@key{sizeManagement}{hinthead}[\Large]{\def\xcb@fontsize@hinthead{#1}}
+\savekeys{sizeManagement}
+{
+ recipename,
+ ing,
+ inghead,
+ prep,
+ prephead,
+ hint,
+ hinthead
+}
+
+% \end{macrocode}
+%
+% \begin{macro}{\setRecipeSizes}
+% The parameter are set in the form "key~=~value" as known by the \texttt{xkeyval} package.
+% \begin{macrocode}
+\newcommand*{\setRecipeSizes}[1]
+{
+ \setkeys{sizeManagement}{#1}
+}
+
+% \end{macrocode}
+% \end{macro}
+% This is the initialisation of all required recipe sizes.
+% \begin{macrocode}
+\setRecipeSizes
+{% initialisation
+ recipename,
+ ing,
+ inghead,
+ prep,
+ prephead,
+ hint,
+ hinthead
+}
+
+% \end{macrocode}
+%
+% \begin{macro}{\setRecipenameFont}
+% This macro sets the font for the name of the recipe. You have to insert the fontfamily, fontencoding, fontseries and fontshape. The size is set by the \texttt{sizeManagement}
+% \begin{macrocode}
+%% Handwritten fonts: hlce, pbsi, hlcw, fjd, fau
+%% Other fonts: fwb
+\newcommand*{\setRecipenameFont}[4]
+{% sets the font for the recipename
+ \def\xcb@font@recipename
+ {
+ \fontfamily{#1}
+ \fontencoding{#2}
+ \fontseries{#3} %x1
+ \fontshape{#4}
+ \xcb@fontsize@recipename
+ \selectfont
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% This is the initialisation of the font for the recipename.
+% \begin{macrocode}
+\setRecipenameFont{fjd}{T1}{m}{n}
+
+% \end{macrocode}
+%
+% We need a counter for the numeration of the preparation steps.
+% \begin{macrocode}
+\newcounter{step}
+\setcounter{step}{0}
+% \end{macrocode}
+%
+% Set the color of the numeration of preparation steps.
+% \begin{macrocode}
+\renewcommand{\LettrineFontHook}
+{%
+ \color{\xcb@color@numeration}
+}
+
+% \end{macrocode}
+%
+%
+% \begin{macro}{\step}
+% The command is used for numbering the steps of preparation. Take a look at the \texttt{lettrine} package for details.
+% \begin{macrocode}
+\newcommand{\step}
+{%
+ \lettrine
+ [%
+ lines=2,
+ lhang=0, % space into margin, value between 0 and 1
+ loversize=0.15, % enlarges the height of the capital
+ slope=0em,
+ findent=1em, % gap between capital and intended text
+ nindent=0em % shifts all intended lines, begining with the second line
+ ]{\stepcounter{step}\thestep}{}%
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macrocode}
+\define@key{headlines}{inghead}[Zutaten]{
+ \def\xcb@name@inghead{\textcolor{\xcb@color@inghead}{\textbf{\xcb@fontsize@inghead{#1}}\ }}
+}
+\define@key{headlines}{prephead}[Zubereitung]{
+ \def\xcb@name@prephead{\textcolor{\xcb@color@prephead}{\textbf{\xcb@fontsize@prephead{#1}}\ }}
+}
+\define@key{headlines}{hinthead}[Tipp:]{
+ \def\xcb@name@hinthead{\textcolor{\xcb@color@hinthead}{\xcb@fontsize@hinthead{#1}}}
+}
+\define@key{headlines}{continuationhead}[Fortsetzung]{\def\xcb@name@continuationhead{#1}}
+\define@key{headlines}{continuationfoot}[Fortsetzung auf n\"achster Seite]{\def\xcb@name@continuationfoot{#1}}
+\define@key{headlines}{preparationtime}[\fontsize{14.5pt}{10pt}\Gloves]{\def\xcb@name@preparationtime{#1}}
+\define@key{headlines}{bakingtime}[\fontsize{14.5pt}{10pt}\Oven]{\def\xcb@name@bakingtime{#1}}
+\define@key{headlines}{bakingtemperature}[\Thermo{4}]{\def\xcb@name@bakingtemperature{#1}}
+\define@key{headlines}{portion}[\fontsize{14.5pt}{10pt}\Dish]{\def\xcb@name@portion{#1}}
+\define@key{headlines}{portionvalue}[Personen]{\def\xcb@name@portionvalue{#1}}
+\define@key{headlines}{calory}[Brennwert]{\def\xcb@name@calory{#1}}
+\define@key{headlines}{source}[\PaperPortrait]{\def\xcb@name@source{#1}}
+\savekeys{headlines}
+{
+ inghead,
+ prephead,
+ hinthead,
+ continuationhead,
+ continuationfoot,
+ preparationtime,
+ bakingtime,
+ bakingtemperature,
+ portion,
+ portionvalue,
+ calory,
+ source
+}
+% \end{macrocode}
+%
+% \begin{macro}{\setHeadlines}
+% This allows you to modify the headlines for the recipe parts. This also needed for translations (The default values are german, sorry). The parameter are set in the form "key~=~value" as known by the \texttt{xkeyval} package.
+% \begin{macrocode}
+\newcommand*{\setHeadlines}[1]
+{%
+ \setkeys{headlines}{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\setHeadlines
+{% initialisation
+ inghead,
+ prephead,
+ hinthead,
+ continuationhead,
+ continuationfoot,
+ preparationtime,
+ bakingtime,
+ bakingtemperature,
+ portion,
+ portionvalue,
+ calory,
+ source
+}
+
+% \end{macrocode}
+% \begin{macrocode}
+\define@key{recipelengths}{preparationwidth}[0.60\textwidth]{\def\xcb@preparationwidth{#1}}
+\define@key{recipelengths}{ingredientswidth}[0.35\textwidth]{\def\xcb@ingredientswidth{#1}}
+\define@key{recipelengths}{pictureheight}[6cm]{\def\xcb@pictureheight{#1}}
+\savekeys{recipelengths}
+{
+ preparationwidth,
+ ingredientswidth,
+ pictureheight
+}
+
+% \end{macrocode}
+%
+% \begin{macro}{\setRecipeLengths}
+% This command allows to modify most sizes of the recipe. The \texttt{pictureheight} is the height of the two pictures above the text.
+% \begin{macrocode}
+\newcommand*{\setRecipeLengths}[1]
+{%
+ \setkeys{recipelengths}{#1}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\setRecipeLengths
+{% initialisation
+ preparationwidth,
+ ingredientswidth,
+ pictureheight
+}
+
+% \end{macrocode}
+% \begin{macrocode}
+\define@key{graph}{small}[]{
+ \def\xcb@sgraph{
+ \ifthenelse{\equal{#1}{}}
+ {% not set => not shown
+ }
+ {
+ \vspace{-0.5cm}
+ \includegraphics[width=\linewidth, height = \xcb@pictureheight, keepaspectratio]{#1}
+ }
+ }
+}
+\define@key{graph}{big}[]{
+ \def\xcb@bgraph{
+ \ifthenelse{\equal{#1}{}}
+ {% not set => not shown
+ }
+ {
+ \vspace{-0.5cm}
+ \includegraphics[width=\linewidth, height = \xcb@pictureheight, keepaspectratio]{#1}
+ }
+ }
+}
+
+\define@key{recipe}{preparationtime}[]{\def\xcb@preparationtime{#1}}
+\define@key{recipe}{bakingtime}[]{\def\xcb@bakingtime{#1}}
+\define@key{recipe}{bakingtemperature}[]{\def\xcb@bakingtemperature{#1}}
+\define@key{recipe}{portion}[]{\def\xcb@portion{#1}}
+\define@key{recipe}{calory}[]{\def\xcb@calory{#1}}
+\define@key{recipe}{source}[]{\def\xcb@source{#1}}
+
+% \end{macrocode}
+%
+% \begin{macro}{\portion}
+% This macro is for inserting the portions correctly. By renewing this command you can easiliy define your own design for the portions.
+% \begin{macrocode}
+\newcommand*{\portion}[2][\xcb@name@portionvalue]{\unit[#2]{#1}}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\bakingtemperature}
+% This macro is used for inserting different bakingtemperatures. Only entered temperatures are displayed (with a symbol from \texttt{cookingsymbols} package). You can change the order of the temperatures by renew this command.
+% \begin{macrocode}
+\define@key{bakingtemperature}{fanoven}[]{\def\xcb@bakingtemperature@fanoven{#1}}
+\define@key{bakingtemperature}{topbottomheat}[]{\def\xcb@bakingtemperature@topbottomheat{#1}}
+\define@key{bakingtemperature}{topheat}[]{\def\xcb@bakingtemperature@topheat{#1}}
+\define@key{bakingtemperature}{bottomheat}[]{\def\xcb@bakingtemperature@bottomheat{#1}}
+\define@key{bakingtemperature}{gasstove}[]{\def\xcb@bakingtemperature@gasstove{#1}}
+
+\newboolean{xcb@bakingtemperature@firstentry}
+\newcommand*{\bakingtemperature}[1]
+{%
+ \setboolean{xcb@bakingtemperature@firstentry}{true}%
+ \setkeys{bakingtemperature}{fanoven, topbottomheat, topheat, bottomheat, gasstove}%
+ \setkeys{bakingtemperature}{#1}%
+
+ \ifthenelse{\equal{\xcb@bakingtemperature@fanoven}{}}%
+ {}%
+ {%
+ \xcb@bakingtemperature@fanoven \ {\fontsize{14.5pt}{10pt}\Fanoven}%
+ \setboolean{xcb@bakingtemperature@firstentry}{false}%
+ }%
+ \ifthenelse{\equal{\xcb@bakingtemperature@topbottomheat}{}}%
+ {}%
+ {%
+ \ifthenelse{\boolean{xcb@bakingtemperature@firstentry}}{\setboolean{xcb@bakingtemperature@firstentry}{false}}{, }%
+ \xcb@bakingtemperature@topbottomheat \ {\fontsize{14.5pt}{10pt}\Topbottomheat}%
+ }%
+ \ifthenelse{\equal{\xcb@bakingtemperature@topheat}{}}%
+ {}%
+ {%
+ \ifthenelse{\boolean{xcb@bakingtemperature@firstentry}}{\setboolean{xcb@bakingtemperature@firstentry}{false}}{, }%
+ \xcb@bakingtemperature@topheat \ {\fontsize{14.5pt}{10pt}\Topheat}%
+ }%
+ \ifthenelse{\equal{\xcb@bakingtemperature@bottomheat}{}}%
+ {}%
+ {%
+ \ifthenelse{\boolean{xcb@bakingtemperature@firstentry}}{\setboolean{xcb@bakingtemperature@firstentry}{false}}{, }%
+ \xcb@bakingtemperature@bottomheat \ {\fontsize{14.5pt}{10pt}\Bottomheat}%
+ }%
+ \ifthenelse{\equal{\xcb@bakingtemperature@gasstove}{}}%
+ {}%
+ {%
+ \ifthenelse{\boolean{xcb@bakingtemperature@firstentry}}{\setboolean{xcb@bakingtemperature@firstentry}{false}}{, }%
+ \xcb@bakingtemperature@gasstove \ {\fontsize{14.5pt}{10pt}\Gasstove}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Recipe Environment}
+% \begin{environment}{recipe}
+% This the environment for inserting recipes. Inside you define your ingredients, preparation, pictures (graph) and maybe a hint.
+% The commands \texttt{xcb@cmd@myrecipeoverview} and \texttt{xcb@cmd@wrapfill} are intended for internal use only.
+% \begin{macrocode}
+\newenvironment{recipe}[2][]
+{
+ %% macros
+ \newcommand*{\graph}[1]
+ {%
+ \setkeys{graph}{##1}
+ }
+
+ \newcommand*{\ingredients}[1]
+ {%
+ \def\xcb@ingredients
+ {%
+ \vspace{-1em} % same height of ingredients and preparation
+ \xcb@name@inghead
+ %\\[4pt]
+ \\[1em]
+ \xcb@fontsize@ing\color{\xcb@color@ing}
+ \begin{tabular}{rll}
+ ##1
+ \end{tabular}
+ }
+ }
+
+ \newcommand*{\preparation}[1]
+ {%
+ \def\xcb@preparation
+ {%
+ \xcb@name@prephead
+ %\\[4pt]
+ \xcb@fontsize@prep\color{\xcb@color@prep}##1
+ }
+ \setcounter{step}{0}
+ }
+
+ \newcommand*{\hint}[1]
+ {%
+ \def\xcb@hint
+ {%
+ \pagebreak[1] % begin here a new page, if the space is small
+ \begin{tikzpicture}[line width = 1.5pt, \xcb@color@hintline]
+ \useasboundingbox (0,0) -- ++(right:3.5cm) -- ++(up:3mm) -- ++(left:3.5cm) -- cycle;
+ \draw (-3mm, 0mm) -- ++(right:3.5cm);
+ \draw (0, 3mm) -- ++(down:2.4cm);
+ \end{tikzpicture}
+
+ \nopagebreak
+
+ \begingroup % a group for the hint
+ \leftskip1em
+ \xcb@name@hinthead
+ \nopagebreak
+
+ \itshape\textcolor{\xcb@color@hint}{\xcb@fontsize@hint{##1}}
+ \par
+ \endgroup
+ }
+ }
+
+ \newcommand{\xcb@cmd@recipeoverview}
+ {
+ \begin{tabular}{rl}
+ \ifthenelse{\equal{\xcb@preparationtime}{}}
+ {% not set => not shown
+ }
+ {
+ \xcb@name@preparationtime & \xcb@preparationtime\\
+ }
+ \ifthenelse{\equal{\xcb@bakingtime}{}}
+ {% not set => not shown
+ }
+ {
+ \xcb@name@bakingtime & \xcb@bakingtime\ifthenelse{\equal{\xcb@bakingtemperature}{}}
+ {
+ \\
+ }
+ {,\hspace{1em} \xcb@name@bakingtemperature \hspace{1ex} \xcb@bakingtemperature\\
+ }
+ }
+ \ifthenelse{\equal{\xcb@portion}{}}
+ {% not set => not shown
+ }
+ {
+ \xcb@name@portion & \xcb@portion\\
+ }
+ \ifthenelse{\equal{\xcb@calory}{}}
+ {% not set => not shown
+ }
+ {
+ \xcb@name@calory & \xcb@calory\\
+ }
+ \ifthenelse{\equal{\xcb@source}{}}
+ {% not set => not shown
+ }
+ {
+ \xcb@name@source & \xcb@source
+ }
+ \end{tabular}
+ }
+
+% \end{macrocode}
+% The following command is needed, if more ingredients than preparation (steps) are inserted. In this case the \texttt{wrapfigure} package behaves in a strange way. The result is that the hint is also floating around the ingredients, although the "box" is already closed. This command repairs this effect.
+% It is taken from http://mizine.de/latex/wrapfigure-austricksen/
+% \begin{macrocode}
+ \newcommand\xcb@cmd@wrapfill
+ {%
+ \par
+ \ifx\parshape\WF@fudgeparshape
+ \nobreak
+ \vskip-\baselineskip
+ \vskip\c@WF@wrappedlines\baselineskip
+ \allowbreak
+ \WFclear
+ \fi
+ }
+ %% end of macros
+
+
+ % initialisation
+ \setkeys{recipe}{preparationtime, bakingtime, bakingtemperature, portion, calory, source}
+ \setkeys{graph}{small, big}
+ \ingredients{}
+ \preparation{}
+ \def\xcb@hint{}
+
+ \def\xcb@recipename{#2}
+ \setkeys{recipe}{#1} % reading the optional parameters
+
+ \setcounter{xcb@newpagefoot}{1}
+ \setcounter{xcb@newpagehead}{\value{page}}
+}
+{% this part is executed at \end{recipe}
+%% FIRST BLOCK
+ \if@twoside
+ \ifodd\arabic{page}
+ \begin{minipage}[T]{\xcb@preparationwidth}
+ \xcb@bgraph
+ \end{minipage}
+ \hfill
+ \begin{minipage}[T]{\xcb@ingredientswidth}
+ \xcb@sgraph
+ \end{minipage}
+ \else
+ \begin{minipage}[T]{\xcb@ingredientswidth}
+ \xcb@sgraph
+ \end{minipage}
+ \hfill
+ \begin{minipage}[T]{\xcb@preparationwidth}
+ \xcb@bgraph
+ \end{minipage}
+ \fi
+ \else
+ \begin{minipage}[T]{\xcb@preparationwidth}
+ \xcb@bgraph
+ \end{minipage}
+ \hfill
+ \begin{minipage}[T]{\xcb@ingredientswidth}
+ \xcb@sgraph
+ \end{minipage}
+ \fi
+
+%% SECOND BLOCK
+ \recipesection[\normalsize\xcb@recipename]%
+ {\hspace{-1em}\textcolor{\xcb@color@recipename}{\xcb@font@recipename\xcb@recipename}}
+ \xcb@cmd@recipeoverview
+
+%% THIRD BLOCK
+ \begin{wraptable}{r}{\xcb@ingredientswidth}
+ {
+ \xcb@ingredients
+ }
+ \end{wraptable}
+ \xcb@preparation
+
+ \vfill
+
+ \xcb@cmd@wrapfill
+ \xcb@hint
+ \setcounter{xcb@newpagefoot}{0}
+}
+
+% \end{macrocode}
+% \end{environment}
+%
+% \subsection{Header and Footer}
+% \begin{macrocode}
+\pagestyle{fancy}
+\renewcommand{\sectionmark}[1]
+{%
+ \markright{\MakeUppercase{\thesection.\ #1}}
+}
+\renewcommand{\headrulewidth}
+{%
+ 0.5pt
+}
+\fancyhf{}
+\fancyfoot[LE,RO]{\textbf{\thepage}}
+\fancyhead[LE,RO]{\rightmark}
+\fancyhead[C]{\@newpagehint{head}}
+\fancyfoot[C]{\@newpagehint{foot}}
+
+% \end{macrocode}
+% Below the counter for the header and the footer are defined and initialised.
+% \begin{macrocode}
+\newcounter{xcb@newpagehead}
+\setcounter{xcb@newpagehead}{0}
+\newcounter{xcb@newpagefoot}
+\setcounter{xcb@newpagefoot}{0}
+% \end{macrocode}
+% \begin{macro}{\@newpagehint}
+% This macro is used to create a hint in the head or foot of the page, that the recipe is longer than one page.
+% \begin{macrocode}
+\newcommand*{\@newpagehint}[1]
+{
+ \ifthenelse{\equal{#1}{head}}
+ {
+ \ifnum \value{xcb@newpagehead} < \value{page}
+ \ifnum \value{xcb@newpagehead} > 0
+ \xcb@name@continuationhead
+ \fi
+ \fi
+ }
+ {
+ \ifthenelse{\value{xcb@newpagefoot} > 0}
+ {
+ \xcb@name@continuationfoot
+ }
+ {% if no message at the bottom is set, there is no need for a message on the next page
+ \setcounter{xcb@newpagehead}{0}
+ }
+ }
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Background Picture}
+% \begin{macrocode}
+\define@key{background}{width}[\linewidth]{\def\xcb@background@width{#1}}
+\define@key{background}{height}[\paperheight]{\def\xcb@background@height{#1}}
+\define@key{background}{x}[0cm]{\def\xcb@background@x{#1}}
+\define@key{background}{y}[0cm]{\def\xcb@background@y{#1}}
+\define@key{background}{orientation}[default]{\def\xcb@background@orientation{#1}}
+\savekeys{background}
+{%
+ width,
+ height,
+ x,
+ y,
+ orientation
+}
+
+% \end{macrocode}
+% \begin{macro}{\setBackgroundPicture}
+% This macro is intended to set easily a (transparent) background. The command uses the \texttt{eso-pic} package. If the implemented options are not satisfying you, you may take a look at the documentation of \texttt{eso-pic} when redefining this command.
+% \begin{macrocode}
+\newcommand*{\setBackgroundPicture}[2][]
+{%
+ \ClearShipoutPictureBG
+ \setkeys{background}{width, height, x, y, orientation} % initialisation
+ \setkeys{background}{#1}
+ \AddToShipoutPicture
+ {%
+ \ifthenelse{\equal{\xcb@background@orientation}{default}}
+ {% default
+ \put(\xcb@background@x, \xcb@background@y)
+ {%
+ \parbox[b][\xcb@background@height]{\xcb@background@width}
+ {%
+ \vfill
+ \includegraphics[width=\xcb@background@width, height=\xcb@background@height, keepaspectratio]{#2}%
+ \vfill
+ }
+ }
+ }
+ {%
+ \ifthenelse{\equal{\xcb@background@orientation}{pagecenter}}
+ {% pagecenter
+ \AtPageCenter{%
+ \makebox(\xcb@background@x, \xcb@background@y)[c]
+ {%
+ \includegraphics[width=\xcb@background@width, height=\xcb@background@height, keepaspectratio]{#2}
+ }
+ }
+ }
+ {%
+ \ifthenelse{\equal{\xcb@background@orientation}{textcenter}}
+ {% textcenter
+ \AtTextCenter{%
+ \makebox(\xcb@background@x, \xcb@background@y)[c]
+ {%
+ \includegraphics[width=\xcb@background@width, height=\xcb@background@height, keepaspectratio]{#2}
+ }
+ }
+ }
+ {%
+ \ifthenelse{\equal{\xcb@background@orientation}{stockcenter}}
+ {% stockcenter
+ \AtStockCenter{%
+ \makebox(\xcb@background@x, \xcb@background@y)[c]
+ {%
+ \includegraphics[width=\xcb@background@width, height=\xcb@background@height, keepaspectratio]{#2}
+ }
+ }
+ }
+ {% error message
+ \PackageError{xcookybooky}
+ {There is no '\xcb@background@orientation' option for background picture orientation available!}
+ {The possible options are: default, pagecenter, textcenter or stockcenter}
+ }
+ }
+ }
+ }
+
+ }
+}
+%</package>
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Configuration file}
+% \label{sec:configuration}
+% This file is intended to change the design central. The most important commands are already written down. You have to submit the option \texttt{myconfig}, if you want to load the configuration file.
+% \begin{macrocode}
+%<*config>
+%% Change Layout
+\setRecipeColors
+{%
+ recipename,
+ ing,
+ inghead,
+ prep,
+ prephead,
+ hint,
+ hinthead,
+ hintline,
+ numeration
+}
+
+\setRecipeSizes
+{%
+ recipename,
+ ing,
+ inghead,
+ prep,
+ prephead,
+ hint,
+ hinthead
+}
+
+\setRecipeLengths
+{%
+ preparationwidth,
+ ingredientswidth,
+ pictureheight
+}
+
+\setRecipenameFont{fjd}{T1}{m}{n}
+
+
+%% Translation
+\setHeadlines
+{%
+ inghead,
+ prephead,
+ hinthead,
+ continuationhead,
+ continuationfoot,
+ preparationtime,
+ bakingtime,
+ bakingtemperature,
+ portion,
+ portionvalue,
+ calory,
+ source
+}
+%</config>
+% \end{macrocode}
+%
+% \Finale
+\endinput \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/xcookybooky/xcookybooky.ins b/Master/texmf-dist/source/latex/xcookybooky/xcookybooky.ins
new file mode 100644
index 00000000000..3b23f735547
--- /dev/null
+++ b/Master/texmf-dist/source/latex/xcookybooky/xcookybooky.ins
@@ -0,0 +1,62 @@
+ %% --------------------- xcookybooky.ins -------------------------
+
+
+\def\filedate{2011/12/29}
+\def\batchfile{xcookybooky.ins}
+
+\input docstrip
+\ifx\generate\undefined
+ \obeyspaces
+ \Msg{************************************************}
+ \Msg{* *}
+ \Msg{* This installation requires docstrip *}
+ \Msg{* version 2.4 or later. *}
+ \Msg{* *}
+ \Msg{* An older version of docstrip has been input. *}
+ \Msg{* *}
+ \Msg{************************************************}
+ \errhelp{Move or rename old docstrip.tex and get a newer one.}
+ \errmessage{Old docstrip in input path}
+ \batchmode
+ \csname @@end\endcsname\end
+\fi
+
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+This is a generated file.
+Copyright (C) 2011 by Sven Harder
+
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in:
+
+http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+\endpreamble
+
+\declarepreamble\configpreamble
+\endpreamble
+
+\generate
+{%
+ \file{xcookybooky.sty}{\from{xcookybooky.dtx}{package}}
+ \usepreamble\configpreamble
+ \file{xcookybooky.cfg}{\from{xcookybooky.dtx}{config}}
+}
+ \obeyspaces
+ \Msg{**********************************************************************}
+ \Msg{* *}
+ \Msg{* \space To finish the installation you have to copy the file *}
+ \Msg{* *}
+ \Msg{* \space *.sty and *.cfg into a directory in the search path by TeX *}
+ \Msg{* *}
+ \Msg{**********************************************************************}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
diff --git a/Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.cfg b/Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.cfg
new file mode 100644
index 00000000000..ab134ec5d37
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.cfg
@@ -0,0 +1,63 @@
+%%
+%% This is file `xcookybooky.cfg',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xcookybooky.dtx (with options: `config')
+%%
+\ProvidesFile{xcookybooky.cfg}
+ [2011/12/29 v1.0 'xcookybooky' configuration]
+%% Change Layout
+\setRecipeColors
+{%
+ recipename,
+ ing,
+ inghead,
+ prep,
+ prephead,
+ hint,
+ hinthead,
+ hintline,
+ numeration
+}
+
+\setRecipeSizes
+{%
+ recipename,
+ ing,
+ inghead,
+ prep,
+ prephead,
+ hint,
+ hinthead
+}
+
+\setRecipeLengths
+{%
+ preparationwidth,
+ ingredientswidth,
+ pictureheight
+}
+
+\setRecipenameFont{fjd}{T1}{m}{n}
+
+%% Translation
+\setHeadlines
+{%
+ inghead,
+ prephead,
+ hinthead,
+ continuationhead,
+ continuationfoot,
+ preparationtime,
+ bakingtime,
+ bakingtemperature,
+ portion,
+ portionvalue,
+ calory,
+ source
+}
+\endinput
+%%
+%% End of file `xcookybooky.cfg'.
diff --git a/Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.sty b/Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.sty
new file mode 100644
index 00000000000..de59fc5fd5e
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/xcookybooky/xcookybooky.sty
@@ -0,0 +1,623 @@
+%%
+%% This is file `xcookybooky.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xcookybooky.dtx (with options: `package')
+%%
+%% This is a generated file.
+%% Copyright (C) 2011 by Sven Harder
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3 of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xcookybooky}
+ [2011/12/29 v1.0 Easy typesetting (long) recipes with pictures]
+\DeclareOption{myconfig}
+{% load personal configuration
+ \AtEndOfPackage{
+ \InputIfFileExists{xcookybooky.cfg}
+ {\PackageInfo{xcookybooky}{inputting 'xcookybooky.cfg'}}
+ {\PackageWarning{xcookybooky}{cannot find the configuration file 'xcookybooky.cfg'}}
+ }
+}
+\ProcessOptions\relax
+
+\RequirePackage{tikz} % for creating the lines for the hint
+\RequirePackage{graphicx}
+\RequirePackage{xcolor}
+\RequirePackage{emerald} % Handwritten Fonts
+\RequirePackage[clock, misc, weather]{ifsym} % Symbolpackage e.g. \Interval, \Wecker etc
+\RequirePackage{cookingsymbols} % Cookings symbols e.g. \Oven, \Dish etc
+\RequirePackage{wrapfig} % To wrap the tabular with the ingredients
+
+\RequirePackage{ifthen}
+\RequirePackage{xkeyval}
+\RequirePackage{lettrine} % numbering the preparation steps
+\RequirePackage{fancyhdr}
+\RequirePackage{units}
+\RequirePackage{eso-pic} % for background pictures
+\RequirePackage{picture} % for modfifying the position of the bg pictures
+
+\setlength{\parindent}{0cm}
+\setlength{\parskip}{2ex plus 0.5ex}
+
+\setlength{\textwidth}{15.5cm}
+\setlength{\textheight}{24.0cm}
+\setlength{\topmargin}{-0.8cm}
+\setlength{\headheight}{12pt} %0cm
+\setlength{\headsep}{1cm}
+\setlength{\topskip}{0cm}
+\setlength{\footskip}{1.4cm}
+\setlength{\evensidemargin}{-0.5cm}
+\setlength{\oddsidemargin}{0.5cm}
+\setlength{\voffset}{0cm}
+\setlength{\hoffset}{0cm}
+\setcounter{secnumdepth}{2} % subsubsections not numbered
+\setcounter{tocdepth}{3} % subsubsections in the .toc file
+
+\newcommand*{\recipesection}[2][]
+{%
+ \subsubsection[#1]{#2}
+}
+
+\define@key{colorManagement}{recipename}[green]{\def\xcb@color@recipename{#1}}
+\define@key{colorManagement}{ing}[gray]{\def\xcb@color@ing{#1}}
+\define@key{colorManagement}{inghead}[gray]{\def\xcb@color@inghead{#1}}
+\define@key{colorManagement}{prep}[black]{\def\xcb@color@prep{#1}}
+\define@key{colorManagement}{prephead}[black]{\def\xcb@color@prephead{#1}}
+\define@key{colorManagement}{hint}[black]{\def\xcb@color@hint{#1}}
+\define@key{colorManagement}{hinthead}[red]{\def\xcb@color@hinthead{#1}}
+\define@key{colorManagement}{hintline}[red]{\def\xcb@color@hintline{#1}}
+\define@key{colorManagement}{numeration}[red]{\def\xcb@color@numeration{#1}}
+\savekeys{colorManagement}
+{%
+ recipename, % color of recipename
+ ing, % color of ingredients (text)
+ inghead, % color of headline of ingredients
+ prep, % color of preparation (text)
+ prephead, % color of headline of preparation
+ hint, % color of hint (text)
+ hinthead, % color of headline of hint
+ hintline, % color of lines of hint
+ numeration % color of numeration (preparation)
+}
+
+\newcommand*{\setRecipeColors}[1]
+{%
+ \setkeys{colorManagement}{#1}
+}
+
+\setRecipeColors
+{% initialisation
+ recipename,
+ ing,
+ inghead,
+ prep,
+ prephead,
+ hint,
+ hinthead,
+ hintline,
+ numeration
+}
+
+\define@key{sizeManagement}{recipename}[\fontsize{24pt}{30pt}]{\def\xcb@fontsize@recipename{#1}}
+\define@key{sizeManagement}{ing}[\normalsize]{\def\xcb@fontsize@ing{#1}}
+\define@key{sizeManagement}{inghead}[\normalsize]{\def\xcb@fontsize@inghead{#1}}
+\define@key{sizeManagement}{prep}[\normalsize]{\def\xcb@fontsize@prep{#1}}
+\define@key{sizeManagement}{prephead}[\normalsize]{\def\xcb@fontsize@prephead{#1}}
+\define@key{sizeManagement}{hint}[\normalsize]{\def\xcb@fontsize@hint{#1}}
+\define@key{sizeManagement}{hinthead}[\Large]{\def\xcb@fontsize@hinthead{#1}}
+\savekeys{sizeManagement}
+{
+ recipename,
+ ing,
+ inghead,
+ prep,
+ prephead,
+ hint,
+ hinthead
+}
+
+\newcommand*{\setRecipeSizes}[1]
+{
+ \setkeys{sizeManagement}{#1}
+}
+
+\setRecipeSizes
+{% initialisation
+ recipename,
+ ing,
+ inghead,
+ prep,
+ prephead,
+ hint,
+ hinthead
+}
+
+%% Handwritten fonts: hlce, pbsi, hlcw, fjd, fau
+%% Other fonts: fwb
+\newcommand*{\setRecipenameFont}[4]
+{% sets the font for the recipename
+ \def\xcb@font@recipename
+ {
+ \fontfamily{#1}
+ \fontencoding{#2}
+ \fontseries{#3} %x1
+ \fontshape{#4}
+ \xcb@fontsize@recipename
+ \selectfont
+ }
+}
+\setRecipenameFont{fjd}{T1}{m}{n}
+
+\newcounter{step}
+\setcounter{step}{0}
+\renewcommand{\LettrineFontHook}
+{%
+ \color{\xcb@color@numeration}
+}
+
+\newcommand{\step}
+{%
+ \lettrine
+ [%
+ lines=2,
+ lhang=0, % space into margin, value between 0 and 1
+ loversize=0.15, % enlarges the height of the capital
+ slope=0em,
+ findent=1em, % gap between capital and intended text
+ nindent=0em % shifts all intended lines, begining with the second line
+ ]{\stepcounter{step}\thestep}{}%
+}
+
+\define@key{headlines}{inghead}[Zutaten]{
+ \def\xcb@name@inghead{\textcolor{\xcb@color@inghead}{\textbf{\xcb@fontsize@inghead{#1}}\ }}
+}
+\define@key{headlines}{prephead}[Zubereitung]{
+ \def\xcb@name@prephead{\textcolor{\xcb@color@prephead}{\textbf{\xcb@fontsize@prephead{#1}}\ }}
+}
+\define@key{headlines}{hinthead}[Tipp:]{
+ \def\xcb@name@hinthead{\textcolor{\xcb@color@hinthead}{\xcb@fontsize@hinthead{#1}}}
+}
+\define@key{headlines}{continuationhead}[Fortsetzung]{\def\xcb@name@continuationhead{#1}}
+\define@key{headlines}{continuationfoot}[Fortsetzung auf n\"achster Seite]{\def\xcb@name@continuationfoot{#1}}
+\define@key{headlines}{preparationtime}[\fontsize{14.5pt}{10pt}\Gloves]{\def\xcb@name@preparationtime{#1}}
+\define@key{headlines}{bakingtime}[\fontsize{14.5pt}{10pt}\Oven]{\def\xcb@name@bakingtime{#1}}
+\define@key{headlines}{bakingtemperature}[\Thermo{4}]{\def\xcb@name@bakingtemperature{#1}}
+\define@key{headlines}{portion}[\fontsize{14.5pt}{10pt}\Dish]{\def\xcb@name@portion{#1}}
+\define@key{headlines}{portionvalue}[Personen]{\def\xcb@name@portionvalue{#1}}
+\define@key{headlines}{calory}[Brennwert]{\def\xcb@name@calory{#1}}
+\define@key{headlines}{source}[\PaperPortrait]{\def\xcb@name@source{#1}}
+\savekeys{headlines}
+{
+ inghead,
+ prephead,
+ hinthead,
+ continuationhead,
+ continuationfoot,
+ preparationtime,
+ bakingtime,
+ bakingtemperature,
+ portion,
+ portionvalue,
+ calory,
+ source
+}
+\newcommand*{\setHeadlines}[1]
+{%
+ \setkeys{headlines}{#1}
+}
+\setHeadlines
+{% initialisation
+ inghead,
+ prephead,
+ hinthead,
+ continuationhead,
+ continuationfoot,
+ preparationtime,
+ bakingtime,
+ bakingtemperature,
+ portion,
+ portionvalue,
+ calory,
+ source
+}
+
+\define@key{recipelengths}{preparationwidth}[0.60\textwidth]{\def\xcb@preparationwidth{#1}}
+\define@key{recipelengths}{ingredientswidth}[0.35\textwidth]{\def\xcb@ingredientswidth{#1}}
+\define@key{recipelengths}{pictureheight}[6cm]{\def\xcb@pictureheight{#1}}
+\savekeys{recipelengths}
+{
+ preparationwidth,
+ ingredientswidth,
+ pictureheight
+}
+
+\newcommand*{\setRecipeLengths}[1]
+{%
+ \setkeys{recipelengths}{#1}
+}
+\setRecipeLengths
+{% initialisation
+ preparationwidth,
+ ingredientswidth,
+ pictureheight
+}
+
+\define@key{graph}{small}[]{
+ \def\xcb@sgraph{
+ \ifthenelse{\equal{#1}{}}
+ {% not set => not shown
+ }
+ {
+ \vspace{-0.5cm}
+ \includegraphics[width=\linewidth, height = \xcb@pictureheight, keepaspectratio]{#1}
+ }
+ }
+}
+\define@key{graph}{big}[]{
+ \def\xcb@bgraph{
+ \ifthenelse{\equal{#1}{}}
+ {% not set => not shown
+ }
+ {
+ \vspace{-0.5cm}
+ \includegraphics[width=\linewidth, height = \xcb@pictureheight, keepaspectratio]{#1}
+ }
+ }
+}
+
+\define@key{recipe}{preparationtime}[]{\def\xcb@preparationtime{#1}}
+\define@key{recipe}{bakingtime}[]{\def\xcb@bakingtime{#1}}
+\define@key{recipe}{bakingtemperature}[]{\def\xcb@bakingtemperature{#1}}
+\define@key{recipe}{portion}[]{\def\xcb@portion{#1}}
+\define@key{recipe}{calory}[]{\def\xcb@calory{#1}}
+\define@key{recipe}{source}[]{\def\xcb@source{#1}}
+
+\newcommand*{\portion}[2][\xcb@name@portionvalue]{\unit[#2]{#1}}
+
+\define@key{bakingtemperature}{fanoven}[]{\def\xcb@bakingtemperature@fanoven{#1}}
+\define@key{bakingtemperature}{topbottomheat}[]{\def\xcb@bakingtemperature@topbottomheat{#1}}
+\define@key{bakingtemperature}{topheat}[]{\def\xcb@bakingtemperature@topheat{#1}}
+\define@key{bakingtemperature}{bottomheat}[]{\def\xcb@bakingtemperature@bottomheat{#1}}
+\define@key{bakingtemperature}{gasstove}[]{\def\xcb@bakingtemperature@gasstove{#1}}
+
+\newboolean{xcb@bakingtemperature@firstentry}
+\newcommand*{\bakingtemperature}[1]
+{%
+ \setboolean{xcb@bakingtemperature@firstentry}{true}%
+ \setkeys{bakingtemperature}{fanoven, topbottomheat, topheat, bottomheat, gasstove}%
+ \setkeys{bakingtemperature}{#1}%
+
+ \ifthenelse{\equal{\xcb@bakingtemperature@fanoven}{}}%
+ {}%
+ {%
+ \xcb@bakingtemperature@fanoven \ {\fontsize{14.5pt}{10pt}\Fanoven}%
+ \setboolean{xcb@bakingtemperature@firstentry}{false}%
+ }%
+ \ifthenelse{\equal{\xcb@bakingtemperature@topbottomheat}{}}%
+ {}%
+ {%
+ \ifthenelse{\boolean{xcb@bakingtemperature@firstentry}}{\setboolean{xcb@bakingtemperature@firstentry}{false}}{, }%
+ \xcb@bakingtemperature@topbottomheat \ {\fontsize{14.5pt}{10pt}\Topbottomheat}%
+ }%
+ \ifthenelse{\equal{\xcb@bakingtemperature@topheat}{}}%
+ {}%
+ {%
+ \ifthenelse{\boolean{xcb@bakingtemperature@firstentry}}{\setboolean{xcb@bakingtemperature@firstentry}{false}}{, }%
+ \xcb@bakingtemperature@topheat \ {\fontsize{14.5pt}{10pt}\Topheat}%
+ }%
+ \ifthenelse{\equal{\xcb@bakingtemperature@bottomheat}{}}%
+ {}%
+ {%
+ \ifthenelse{\boolean{xcb@bakingtemperature@firstentry}}{\setboolean{xcb@bakingtemperature@firstentry}{false}}{, }%
+ \xcb@bakingtemperature@bottomheat \ {\fontsize{14.5pt}{10pt}\Bottomheat}%
+ }%
+ \ifthenelse{\equal{\xcb@bakingtemperature@gasstove}{}}%
+ {}%
+ {%
+ \ifthenelse{\boolean{xcb@bakingtemperature@firstentry}}{\setboolean{xcb@bakingtemperature@firstentry}{false}}{, }%
+ \xcb@bakingtemperature@gasstove \ {\fontsize{14.5pt}{10pt}\Gasstove}%
+ }%
+}
+\newenvironment{recipe}[2][]
+{
+ %% macros
+ \newcommand*{\graph}[1]
+ {%
+ \setkeys{graph}{##1}
+ }
+
+ \newcommand*{\ingredients}[1]
+ {%
+ \def\xcb@ingredients
+ {%
+ \vspace{-1em} % same height of ingredients and preparation
+ \xcb@name@inghead
+ %\\[4pt]
+ \\[1em]
+ \xcb@fontsize@ing\color{\xcb@color@ing}
+ \begin{tabular}{rll}
+ ##1
+ \end{tabular}
+ }
+ }
+
+ \newcommand*{\preparation}[1]
+ {%
+ \def\xcb@preparation
+ {%
+ \xcb@name@prephead
+ %\\[4pt]
+ \xcb@fontsize@prep\color{\xcb@color@prep}##1
+ }
+ \setcounter{step}{0}
+ }
+
+ \newcommand*{\hint}[1]
+ {%
+ \def\xcb@hint
+ {%
+ \pagebreak[1] % begin here a new page, if the space is small
+ \begin{tikzpicture}[line width = 1.5pt, \xcb@color@hintline]
+ \useasboundingbox (0,0) -- ++(right:3.5cm) -- ++(up:3mm) -- ++(left:3.5cm) -- cycle;
+ \draw (-3mm, 0mm) -- ++(right:3.5cm);
+ \draw (0, 3mm) -- ++(down:2.4cm);
+ \end{tikzpicture}
+
+ \nopagebreak
+
+ \begingroup % a group for the hint
+ \leftskip1em
+ \xcb@name@hinthead
+ \nopagebreak
+
+ \itshape\textcolor{\xcb@color@hint}{\xcb@fontsize@hint{##1}}
+ \par
+ \endgroup
+ }
+ }
+
+ \newcommand{\xcb@cmd@recipeoverview}
+ {
+ \begin{tabular}{rl}
+ \ifthenelse{\equal{\xcb@preparationtime}{}}
+ {% not set => not shown
+ }
+ {
+ \xcb@name@preparationtime & \xcb@preparationtime\\
+ }
+ \ifthenelse{\equal{\xcb@bakingtime}{}}
+ {% not set => not shown
+ }
+ {
+ \xcb@name@bakingtime & \xcb@bakingtime\ifthenelse{\equal{\xcb@bakingtemperature}{}}
+ {
+ \\
+ }
+ {,\hspace{1em} \xcb@name@bakingtemperature \hspace{1ex} \xcb@bakingtemperature\\
+ }
+ }
+ \ifthenelse{\equal{\xcb@portion}{}}
+ {% not set => not shown
+ }
+ {
+ \xcb@name@portion & \xcb@portion\\
+ }
+ \ifthenelse{\equal{\xcb@calory}{}}
+ {% not set => not shown
+ }
+ {
+ \xcb@name@calory & \xcb@calory\\
+ }
+ \ifthenelse{\equal{\xcb@source}{}}
+ {% not set => not shown
+ }
+ {
+ \xcb@name@source & \xcb@source
+ }
+ \end{tabular}
+ }
+
+ \newcommand\xcb@cmd@wrapfill
+ {%
+ \par
+ \ifx\parshape\WF@fudgeparshape
+ \nobreak
+ \vskip-\baselineskip
+ \vskip\c@WF@wrappedlines\baselineskip
+ \allowbreak
+ \WFclear
+ \fi
+ }
+ %% end of macros
+
+ % initialisation
+ \setkeys{recipe}{preparationtime, bakingtime, bakingtemperature, portion, calory, source}
+ \setkeys{graph}{small, big}
+ \ingredients{}
+ \preparation{}
+ \def\xcb@hint{}
+
+ \def\xcb@recipename{#2}
+ \setkeys{recipe}{#1} % reading the optional parameters
+
+ \setcounter{xcb@newpagefoot}{1}
+ \setcounter{xcb@newpagehead}{\value{page}}
+}
+{% this part is executed at \end{recipe}
+%% FIRST BLOCK
+ \if@twoside
+ \ifodd\arabic{page}
+ \begin{minipage}[T]{\xcb@preparationwidth}
+ \xcb@bgraph
+ \end{minipage}
+ \hfill
+ \begin{minipage}[T]{\xcb@ingredientswidth}
+ \xcb@sgraph
+ \end{minipage}
+ \else
+ \begin{minipage}[T]{\xcb@ingredientswidth}
+ \xcb@sgraph
+ \end{minipage}
+ \hfill
+ \begin{minipage}[T]{\xcb@preparationwidth}
+ \xcb@bgraph
+ \end{minipage}
+ \fi
+ \else
+ \begin{minipage}[T]{\xcb@preparationwidth}
+ \xcb@bgraph
+ \end{minipage}
+ \hfill
+ \begin{minipage}[T]{\xcb@ingredientswidth}
+ \xcb@sgraph
+ \end{minipage}
+ \fi
+
+%% SECOND BLOCK
+ \recipesection[\normalsize\xcb@recipename]%
+ {\hspace{-1em}\textcolor{\xcb@color@recipename}{\xcb@font@recipename\xcb@recipename}}
+ \xcb@cmd@recipeoverview
+
+%% THIRD BLOCK
+ \begin{wraptable}{r}{\xcb@ingredientswidth}
+ {
+ \xcb@ingredients
+ }
+ \end{wraptable}
+ \xcb@preparation
+
+ \vfill
+
+ \xcb@cmd@wrapfill
+ \xcb@hint
+ \setcounter{xcb@newpagefoot}{0}
+}
+
+\pagestyle{fancy}
+\renewcommand{\sectionmark}[1]
+{%
+ \markright{\MakeUppercase{\thesection.\ #1}}
+}
+\renewcommand{\headrulewidth}
+{%
+ 0.5pt
+}
+\fancyhf{}
+\fancyfoot[LE,RO]{\textbf{\thepage}}
+\fancyhead[LE,RO]{\rightmark}
+\fancyhead[C]{\@newpagehint{head}}
+\fancyfoot[C]{\@newpagehint{foot}}
+
+\newcounter{xcb@newpagehead}
+\setcounter{xcb@newpagehead}{0}
+\newcounter{xcb@newpagefoot}
+\setcounter{xcb@newpagefoot}{0}
+\newcommand*{\@newpagehint}[1]
+{
+ \ifthenelse{\equal{#1}{head}}
+ {
+ \ifnum \value{xcb@newpagehead} < \value{page}
+ \ifnum \value{xcb@newpagehead} > 0
+ \xcb@name@continuationhead
+ \fi
+ \fi
+ }
+ {
+ \ifthenelse{\value{xcb@newpagefoot} > 0}
+ {
+ \xcb@name@continuationfoot
+ }
+ {% if no message at the bottom is set, there is no need for a message on the next page
+ \setcounter{xcb@newpagehead}{0}
+ }
+ }
+}
+
+\define@key{background}{width}[\linewidth]{\def\xcb@background@width{#1}}
+\define@key{background}{height}[\paperheight]{\def\xcb@background@height{#1}}
+\define@key{background}{x}[0cm]{\def\xcb@background@x{#1}}
+\define@key{background}{y}[0cm]{\def\xcb@background@y{#1}}
+\define@key{background}{orientation}[default]{\def\xcb@background@orientation{#1}}
+\savekeys{background}
+{%
+ width,
+ height,
+ x,
+ y,
+ orientation
+}
+
+\newcommand*{\setBackgroundPicture}[2][]
+{%
+ \ClearShipoutPictureBG
+ \setkeys{background}{width, height, x, y, orientation} % initialisation
+ \setkeys{background}{#1}
+ \AddToShipoutPicture
+ {%
+ \ifthenelse{\equal{\xcb@background@orientation}{default}}
+ {% default
+ \put(\xcb@background@x, \xcb@background@y)
+ {%
+ \parbox[b][\xcb@background@height]{\xcb@background@width}
+ {%
+ \vfill
+ \includegraphics[width=\xcb@background@width, height=\xcb@background@height, keepaspectratio]{#2}%
+ \vfill
+ }
+ }
+ }
+ {%
+ \ifthenelse{\equal{\xcb@background@orientation}{pagecenter}}
+ {% pagecenter
+ \AtPageCenter{%
+ \makebox(\xcb@background@x, \xcb@background@y)[c]
+ {%
+ \includegraphics[width=\xcb@background@width, height=\xcb@background@height, keepaspectratio]{#2}
+ }
+ }
+ }
+ {%
+ \ifthenelse{\equal{\xcb@background@orientation}{textcenter}}
+ {% textcenter
+ \AtTextCenter{%
+ \makebox(\xcb@background@x, \xcb@background@y)[c]
+ {%
+ \includegraphics[width=\xcb@background@width, height=\xcb@background@height, keepaspectratio]{#2}
+ }
+ }
+ }
+ {%
+ \ifthenelse{\equal{\xcb@background@orientation}{stockcenter}}
+ {% stockcenter
+ \AtStockCenter{%
+ \makebox(\xcb@background@x, \xcb@background@y)[c]
+ {%
+ \includegraphics[width=\xcb@background@width, height=\xcb@background@height, keepaspectratio]{#2}
+ }
+ }
+ }
+ {% error message
+ \PackageError{xcookybooky}
+ {There is no '\xcb@background@orientation' option for background picture orientation available!}
+ {The possible options are: default, pagecenter, textcenter or stockcenter}
+ }
+ }
+ }
+ }
+
+ }
+}
+\endinput
+%%
+%% End of file `xcookybooky.sty'.