# Usage and modification of xcookybooky

The Problem:

I'm trying to use the xcookybooky package to use a cookbook layout. I chose this, since the other recipe, cuisine, cooking and so on are not exactly working for me.But even xcookybooky needs to get some adjustments/modifications, which I do not exactly know how to accomplish.

Below I attached an example pictures and code to which I will refer to.

My issues are:

1. Unicode support: It does not seem to be possible to use the degree Symbol (°) by default. I fixed this by using the \usepackage[utf8x]{inputenc} package. But I have read that this can cause some problems, maybe this is interfering with the other points below.

2. The font for the recipe title (in this case "Currywurst") looks like c**p. The package author writes in his documentation, that there is an option to change the font:

\setRecipenameFont{ %pbsi % fau % fwb % fjd
cmr % default
}{T1}{m}{n}


But even this example does not work and is throwing an (unrelated?) error: "Undefined control sequence \headline".

3. I'd like the ingredient list to start with the recipes info, directly below the recipes title. Yet I haven't found any option to temper with the margins. Maybe I have to alter the package style itself to use a multicolumn box or something? I'm open to suggestions.

4. If I add some text as a description or as some kind of info, it is placed above the whole recipe container, since it is not using the official commands. I'd like to introduce here a new full column box under the recipes title.

Example Picture:

Example Code:

\documentclass[11pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage[a4paper]{geometry}
\usepackage{xcookybooky}

\setRecipeColors
{%
recipename = black,
ing = black,
}

\setRecipeSizes{
recipename = \normalsize,
}

calory = energy content,
continuationfoot = Continuation on next page
}

\begin{document}

\begin{recipe}[
preparationtime = 30 min,
bakingtime = 1 hour,
bakingtemperature = 225°C,
portion = 4 portions,
source = THE INTERNET
]{Currywurst}

Description or some info on the recipe? Nope...

\ingredients{
2   & bars      & Dark chocolate \\\
3   &           & Eggs \\
200 & ml        & Cream \\
40  & g         & Sugar \\
50  & g         & Butter
}

\preparation{
\step This is the first step for cooking a brilliant meal.
\step The second step follows...
}

\end{recipe}
\end{document}


Source/Documentation: http://mirror.ctan.org/macros/latex/contrib/xcookybooky/xcookybooky.pdf

When I look at this list, maybe it would just be easier to modify the whole package :\

-
note: i've never used the package; however i would try contacting the author before pouring bile out on a public forum (if the address in the package isn't good, this doesn't help...). that said, you provide an impressively awful list... – wasteofspace Oct 27 '13 at 13:24

The package is confused by the font name "cmr" with the two spaces at the begin and end of the name. The argument for the family name is not a key value list, where the key value parser might remove the spaces. Solution:

\setRecipenameFont{% pbsi % fau % fwb % fjd
cmr% default
}{T1}{m}{n}

-

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}


For issue 3+4 you will probably have to redefine the whole recipe-environment. I don't see any suitable "hooks" in the definition.

-

I've managed to do what you wanted and hopefully it looks like that

I've only managed to achive it by modifying the xcookybooky.sty. Just replace the default .sty with the one here

You can use it like that

\begin{recipe}
[
infos={kjbkjhblkjhbljn jgu jhgiuh ihgiuytv jguy jgy g97tv9 uyguyb uiuytv iugiuytg uygiu9ygb uyg9uiygb oyuh9uyb ouy9ub yg9uyb oyguyg, ojhbuiyboj ojhbgiub huubhub uhiun ubun ihouhn uhbuo ygtf8 ouu uioj lhbljhb ljhbjhbj jhbouu obhiyhi ihiph ouyigouyg ouyy8yu7h oyu8yuh8 ouybuyuy ouhybpyuipyi},
preparationtime = 30 min,
bakingtime = 1 hour,
bakingtemperature = {\unit[225]{C}},
portion = 4 portions,
calory = 4 kj,
source = My neighbour Sarah
]{\textcolor{blue}{Currywurst}}

...

\end{recipe}


Can someone confirm that the modified .sty is clean and clear, because it's the first time I doing something like that?

-