| 1 |
% \iffalse |
| 2 |
% |
| 3 |
% cooking.dtx |
| 4 |
% Docstrip archive, run through LaTeX. |
| 5 |
% |
| 6 |
% Copyright (C) 1999 Axel Reichert |
| 7 |
% See the files README and COPYING. |
| 8 |
% |
| 9 |
% \fi |
| 10 |
% |
| 11 |
% \changes{v0.9b}{1999-06-24}{First release} |
| 12 |
% |
| 13 |
% \CheckSum{116} |
| 14 |
% |
| 15 |
%% \CharacterTable |
| 16 |
%% {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 |
| 17 |
%% 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 |
| 18 |
%% Digits \0\1\2\3\4\5\6\7\8\9 |
| 19 |
%% Exclamation \! Double quote \" Hash (number) \# |
| 20 |
%% Dollar \$ Percent \% Ampersand \& |
| 21 |
%% Acute accent \' Left paren \( Right paren \) |
| 22 |
%% Asterisk \* Plus \+ Comma \, |
| 23 |
%% Minus \- Point \. Solidus \/ |
| 24 |
%% Colon \: Semicolon \; Less than \< |
| 25 |
%% Equals \= Greater than \> Question mark \? |
| 26 |
%% Commercial at \@ Left bracket \[ Backslash \\ |
| 27 |
%% Right bracket \] Circumflex \^ Underscore \_ |
| 28 |
%% Grave accent \` Left brace \{ Vertical bar \| |
| 29 |
%% Right brace \} Tilde \~} |
| 30 |
% |
| 31 |
% \DeclareRobustCommand*{\env}[1]{\texttt{#1}} |
| 32 |
% \DeclareRobustCommand*{\file}[1]{\texttt{#1}} |
| 33 |
% \DeclareRobustCommand*{\mail}[1]{\texttt{#1}} |
| 34 |
% \DeclareRobustCommand*{\option}[1]{\texttt{#1}} |
| 35 |
% \DeclareRobustCommand*{\package}[1]{\texttt{#1}} |
| 36 |
% \DeclareRobustCommand*{\person}[1]{\textsc{#1}} |
| 37 |
% \DeclareRobustCommand*{\smiley}{\texttt{(-:}} |
| 38 |
% \DeclareRobustCommand*{\source}[1]{\texttt{#1}} |
| 39 |
% \DeclareRobustCommand*{\winkey}{\texttt{(-;}} |
| 40 |
% |
| 41 |
% \title{\file{cooking.sty}} |
| 42 |
% \author{% |
| 43 |
% Axel Reichert \\ |
| 44 |
% \mail{[email protected]}% |
| 45 |
% } |
| 46 |
% \date{1999-06-24} |
| 47 |
% \maketitle |
| 48 |
% \begin{abstract} |
| 49 |
% \noindent |
| 50 |
% \file{cooking.sty} is a package for typesetting cooking |
| 51 |
% recipes. See the files~\file{README} and~\file{COPYING} for |
| 52 |
% additional information and~\file{kraut.tex} for an example. |
| 53 |
% \end{abstract} |
| 54 |
% |
| 55 |
% \tableofcontents |
| 56 |
% |
| 57 |
% |
| 58 |
% \section{Introduction} |
| 59 |
% |
| 60 |
% Quite regularly in the german or international newsgroup someone |
| 61 |
% is asking for a style file or document class to typeset recipes. |
| 62 |
% As I really like to cook in my spare time (you know, when I am |
| 63 |
% not writing packages), I started with some macros inspired by the |
| 64 |
% layout of the well-known german cookbook published |
| 65 |
% by~\person{Dr.\,Oetker}~\cite{Gromzik:1996}. |
| 66 |
% |
| 67 |
% Most books start a recipe with a list of ingredients, after that |
| 68 |
% a few paragraphs describing what to do. Thus it is difficult to |
| 69 |
% find the continuation of the recipe, what to do next, because you |
| 70 |
% have put the recipe aside while you were performing the current |
| 71 |
% step. Some books typeset the ingredients in bold face or use |
| 72 |
% enumerations with numbered steps. In this way the recipe gets |
| 73 |
% more structured and it is easier to understand what to do in |
| 74 |
% which order. |
| 75 |
% |
| 76 |
% An even better solution is to use a two-column layout: Each |
| 77 |
% ingredient appears in the left-hand column, what to do with it is |
| 78 |
% written in the right-hand column. The right column is less wide |
| 79 |
% than the usual width of the text, this makes quick browsing of |
| 80 |
% the recipe easier, like in newspapers. Also, there is no need |
| 81 |
% for a list of ingredients, you just read the left column. This |
| 82 |
% layout is used in~\cite{Gromzik:1996} and also recommended in the |
| 83 |
% popular german textbook on typography by~\person{Willberg} |
| 84 |
% and~\person{Forssman}~\cite{Willberg:1997}. |
| 85 |
% |
| 86 |
% |
| 87 |
% \section{What You Need} |
| 88 |
% |
| 89 |
% Not much: |
| 90 |
% \begin{enumerate} |
| 91 |
% \item \LaTeXe{} (at least the 1994/12/01~release) |
| 92 |
% \item Only for the example file: |
| 93 |
% \begin{enumerate} |
| 94 |
% \item The \package{babel}~package |
| 95 |
% \item The \package{textcomp}~package and the companion fonts |
| 96 |
% \end{enumerate} |
| 97 |
% Both packages nowadays are ``required'' parts of~\LaTeXe{} and |
| 98 |
% included with every good distribution. |
| 99 |
% \end{enumerate} |
| 100 |
% |
| 101 |
% |
| 102 |
% \section{Loading} |
| 103 |
% |
| 104 |
% Load the package with: |
| 105 |
%\begin{verbatim} |
| 106 |
% \usepackage{cooking} |
| 107 |
%\end{verbatim} |
| 108 |
% |
| 109 |
% |
| 110 |
% \section{Options} |
| 111 |
% |
| 112 |
% \DescribeMacro{bf} |
| 113 |
% There are two package options that can be used to change the font |
| 114 |
% of the ingredients: |
| 115 |
% \DescribeMacro{it} |
| 116 |
%\begin{verbatim} |
| 117 |
% \usepackage[bf]{cooking} |
| 118 |
%\end{verbatim} |
| 119 |
% which uses bold face and |
| 120 |
%\begin{verbatim} |
| 121 |
% \usepackage[it]{cooking} |
| 122 |
%\end{verbatim} |
| 123 |
% which uses italic fonts. The latter is the default and can thus |
| 124 |
% be omitted. |
| 125 |
% |
| 126 |
% \DescribeMacro{nopage} |
| 127 |
% There are two further package options controlling the page breaks |
| 128 |
% between recipes: |
| 129 |
% \DescribeMacro{newpage} |
| 130 |
%\begin{verbatim} |
| 131 |
% \usepackage[nopage]{cooking} |
| 132 |
%\end{verbatim} |
| 133 |
% allows recipes anywhere on the page, whereas |
| 134 |
%\begin{verbatim} |
| 135 |
% \usepackage[newpage]{cooking} |
| 136 |
%\end{verbatim} |
| 137 |
% forces a new page after each recipe. The latter is the default. |
| 138 |
% |
| 139 |
% |
| 140 |
% \section{Usage} |
| 141 |
% |
| 142 |
% \DescribeMacro{recipe} |
| 143 |
% Recipes are written inside \env{recipe}~environments, which |
| 144 |
% requires one argument, the recipe title: |
| 145 |
%\begin{verbatim} |
| 146 |
% \begin{recipe}{<recipe title>} |
| 147 |
% <recipe text> |
| 148 |
% \end{recipe} |
| 149 |
%\end{verbatim} |
| 150 |
% \DescribeMacro{\ingredient} |
| 151 |
% The text of the recipe usually consists of various ingredients |
| 152 |
% and the corresponding step: |
| 153 |
%\begin{verbatim} |
| 154 |
% \ingredient{<ingredient>} <step> |
| 155 |
% \ingredient{<ingredient>} <step> |
| 156 |
% \ingredient{<ingredient>} |
| 157 |
% \ingredient{<ingredient>} <step> |
| 158 |
% ... |
| 159 |
%\end{verbatim} |
| 160 |
% Note that there is no need to specify a step. In this way it is |
| 161 |
% possible to list several ingredients, e.\,g.\ spices. The step |
| 162 |
% can be divided into paragraphs by blank lines, as usual. |
| 163 |
% |
| 164 |
% \DescribeMacro{\energy} |
| 165 |
% All these commands take one mandatory argument and do what you |
| 166 |
% \DescribeMacro{\sidedish} |
| 167 |
% would expect: They typeset the energy content (in~kJ), recommend a |
| 168 |
% \DescribeMacro{\hint} |
| 169 |
% sidedish, give a hint, typeset the preparation time and propose |
| 170 |
% \DescribeMacro{\preparationtime} |
| 171 |
% modifications of the recipe. They can only be used inside the |
| 172 |
% \env{recipe}~environment. |
| 173 |
% \DescribeMacro{\modification} |
| 174 |
%\begin{verbatim} |
| 175 |
% \energy{3500} |
| 176 |
% \sidedish{Potatoes} |
| 177 |
% \hint{Always use fresh vegetables} |
| 178 |
% \preparationtime{30 minutes} |
| 179 |
% \modification{You can also use beef instead of pork} |
| 180 |
%\end{verbatim} |
| 181 |
% However, the ``standard''~text of these commands is written in |
| 182 |
% german, so foreign users have to adapt them. This is explained |
| 183 |
% in the next section. |
| 184 |
% |
| 185 |
% \DescribeMacro{\pagestyle} |
| 186 |
% The package also provides a new pagestyle that suits to the |
| 187 |
% layout of the recipes. You can select this pagestyle with: |
| 188 |
%\begin{verbatim} |
| 189 |
% \pagestyle{recipe} |
| 190 |
%\end{verbatim} |
| 191 |
% |
| 192 |
% |
| 193 |
% \section{Customization} |
| 194 |
% |
| 195 |
% \DescribeMacro{\recipemargin} |
| 196 |
% A crucial point of the layout chosen for the recipes is the width |
| 197 |
% of the column used for the ingredients (more precisely: the |
| 198 |
% horizontal position of the start of the right-hand column). The |
| 199 |
% default value of~|0.35\columnwidth| is pretty good, but this of |
| 200 |
% course depends on the font used, the verbosity used to describe |
| 201 |
% the ingredients etc. So you can change the width as usual |
| 202 |
% in~\LaTeX{} like this: |
| 203 |
%\begin{verbatim} |
| 204 |
% \setlength{\recipemargin}{5cm} |
| 205 |
%\end{verbatim} |
| 206 |
% Absolute measures like this, however, should be avoided, because |
| 207 |
% they are less flexible if you change the page margins or the font |
| 208 |
% size. |
| 209 |
% |
| 210 |
% \DescribeMacro{\ingredientfont} |
| 211 |
% The font used for the ingredients can be changed, not only via |
| 212 |
% package options mentioned in section~``Loading'': |
| 213 |
%\begin{verbatim} |
| 214 |
% \renewcommand*{\ingredientfont}{\scshape} |
| 215 |
%\end{verbatim} |
| 216 |
% Of course, this would be a very bad choice, because a caps and |
| 217 |
% small caps font needs by far too much space for a reasonable line |
| 218 |
% breaking in the ingredients column. |
| 219 |
% |
| 220 |
% \DescribeMacro{\recipeendhook} |
| 221 |
% If you neither want each recipe on a new page nor recipe after |
| 222 |
% recipe, you can set up a hook that is executed at the end of each |
| 223 |
% recipe. A simple example would be: |
| 224 |
%\begin{verbatim} |
| 225 |
% \renewcommand*{\recipeendhook}{\hrulefill} |
| 226 |
%\end{verbatim} |
| 227 |
% |
| 228 |
% \DescribeMacro{\recipetitlefont} |
| 229 |
% Normally the recipe title is typeset larger, ragged right and |
| 230 |
% with the same font as the ingredients. Feel free to change |
| 231 |
% it. Some typographical remarks: Many people like bold face for |
| 232 |
% the ingredients and the title. In my opinion it is however not |
| 233 |
% necessary to emphasize these things so strongly. The two-colomn |
| 234 |
% layout makes the distinction between ingredient and step an easy |
| 235 |
% one and the title already looks different because of size |
| 236 |
% \emph{and} shape. Bold face does not further help the |
| 237 |
% reader. And in almost all cases you should use the same font for |
| 238 |
% title and ingredients. Less is more. OK. And now something for |
| 239 |
% you strange guys out there: \winkey |
| 240 |
%\begin{verbatim} |
| 241 |
% \renewcommand*{\recipetitlefont}{% |
| 242 |
% \centering\tiny\ttfamily\itshape |
| 243 |
% } |
| 244 |
%\end{verbatim} |
| 245 |
% |
| 246 |
% \DescribeMacro{\recipetitle} |
| 247 |
% If you do not like the layout of the recipe title at all, you can |
| 248 |
% redefine the \cmd{\recipetitle}~command, which is used internally |
| 249 |
% by the \env{recipe}~environment and takes one mandatory argument, |
| 250 |
% the recipe title as passed to the \env{recipe}~environment. As |
| 251 |
% usual, a stupid example: |
| 252 |
%\begin{verbatim} |
| 253 |
% \renewcommand*{\recipetitle}[1]{\marginpar{#1}} |
| 254 |
%\end{verbatim} |
| 255 |
% |
| 256 |
% \DescribeMacro{\energy, ...} |
| 257 |
% As an example for the customization of these little commands, I |
| 258 |
% will provide an english translation of the default definitions: |
| 259 |
%\begin{verbatim} |
| 260 |
% \renewcommand*{\energy}[1]{% |
| 261 |
% \item #1\,kJ per helping% |
| 262 |
% } |
| 263 |
% \renewcommand*{\sidedish}[1]{% |
| 264 |
% \item[Sidedish] #1% |
| 265 |
% } |
| 266 |
% \renewcommand*{\hint}[1]{% |
| 267 |
% \item[Hint] #1% |
| 268 |
% } |
| 269 |
% \renewcommand*{\preparationtime}[1]{% |
| 270 |
% \item[Preparation time] #1% |
| 271 |
% } |
| 272 |
% \renewcommand*{\modification}[1]{% |
| 273 |
% \item[Modification] #1% |
| 274 |
% } |
| 275 |
%\end{verbatim} |
| 276 |
% |
| 277 |
% |
| 278 |
% \section{Example} |
| 279 |
% |
| 280 |
% Run the example file~\file{kraut.tex} through~\LaTeX. Sorry, it |
| 281 |
% is written in german. My knowledge of the english language is |
| 282 |
% too poor, I am not able to translate a recipe.\footnote{Perhaps |
| 283 |
% you agree: In my humble opinion this is one of the most |
| 284 |
% difficult problems when learning a language. Remember yourself |
| 285 |
% explaining famous dishes of your country to those strange foreign |
| 286 |
% exchange students? \winkey} |
| 287 |
% |
| 288 |
% However, if you can get hold of a german-speaking person, you |
| 289 |
% definitely should, the recipe is really worth it. But be |
| 290 |
% prepared: Even native speakers sometimes do not know the meaning |
| 291 |
% of~``Rauchenden''. A synonym is~``Landj\"ager'' |
| 292 |
% or~``Schinkenmettwurst''. ``Semmelbr\"osel'' could also be |
| 293 |
% replaced by~``Paniermehl''. \smiley |
| 294 |
% |
| 295 |
% And, of course: If you tried the dish, please send me a mail. I |
| 296 |
% am very interested in opinions about it. |
| 297 |
% |
| 298 |
% \section{Implementation} |
| 299 |
% |
| 300 |
% |
| 301 |
% \iffalse |
| 302 |
%<*driver> |
| 303 |
\documentclass[12pt,a4paper]{ltxdoc} |
| 304 |
\begin{document} |
| 305 |
\DocInput{cooking.dtx} |
| 306 |
\end{document} |
| 307 |
%</driver> |
| 308 |
% \fi |
| 309 |
% \StopEventually{% |
| 310 |
% \addcontentsline{toc}{section}{References} |
| 311 |
% \begin{thebibliography}{1} |
| 312 |
% \bibitem{Goossens:1994} |
| 313 |
% \textsc{Goossens, M.; Mittelbach, F.; Samarin, A.}: \emph{Der |
| 314 |
% \LaTeX-Begleiter}. \newblock Addison-Wesley, Bonn, 1st edn., |
| 315 |
% 1994. |
| 316 |
% \bibitem{Gromzik:1996} |
| 317 |
% \textsc{Gromzik, J.; Reich, C.; Sander, C.} (ed.): |
| 318 |
% \emph{Dr.~Oetker Schulkochbuch -- Das Original}. \newblock |
| 319 |
% Ceres, Bielefeld, 1996. |
| 320 |
% \bibitem{Willberg:1997} |
| 321 |
% \textsc{Willberg, H.\,P.; Forssman, F.}: |
| 322 |
% \emph{Lesetypographie}. \newblock Schmidt, Mainz, 1997. |
| 323 |
% \end{thebibliography} |
| 324 |
% } |
| 325 |
% \iffalse |
| 326 |
%<*package> |
| 327 |
% \fi |
| 328 |
% |
| 329 |
% |
| 330 |
% \subsection{Identification} |
| 331 |
% |
| 332 |
% This package uses the \source{*}-form |
| 333 |
% of~\cmd{\DeclareRobustCommand}, so it will not work with the very |
| 334 |
% first \LaTeXe~release. |
| 335 |
% \begin{macrocode} |
| 336 |
\NeedsTeXFormat{LaTeX2e}[1994/12/01]% |
| 337 |
% \end{macrocode} |
| 338 |
% The package identifies itself with its release date, a version |
| 339 |
% number, and a short description. |
| 340 |
% \begin{macrocode} |
| 341 |
\ProvidesPackage{cooking}[% |
| 342 |
1999/06/24 v0.9b Cooking recipes% |
| 343 |
]% |
| 344 |
% \end{macrocode} |
| 345 |
% |
| 346 |
% |
| 347 |
% \subsection{Initialization} |
| 348 |
% |
| 349 |
% \begin{macro}{\recipemargin} |
| 350 |
% This initializes the position of the main axis of the layout. The |
| 351 |
% value~``0.35'' is chosen such that the left column looks not too |
| 352 |
% ragged but does not occupy too much space. Trust my experience. |
| 353 |
% \winkey |
| 354 |
% \begin{macrocode} |
| 355 |
\newlength{\recipemargin}% |
| 356 |
\setlength{\recipemargin}{0.35\columnwidth}% |
| 357 |
% \end{macrocode} |
| 358 |
% \end{macro} |
| 359 |
% \begin{macro}{\ingredientfont} |
| 360 |
% This initializes the font used for ingredients. The default |
| 361 |
% value will be set later by means of package options. |
| 362 |
% \begin{macrocode} |
| 363 |
\DeclareRobustCommand*{\ingredientfont}{\@empty}% |
| 364 |
% \end{macrocode} |
| 365 |
% \end{macro} |
| 366 |
% \begin{macro}{\recipeendhook} |
| 367 |
% This is the command to be executed after every recipe. Its |
| 368 |
% default value will be set later by means of package options. |
| 369 |
% \begin{macrocode} |
| 370 |
\DeclareRobustCommand*{\recipeendhook}{\@empty}% |
| 371 |
% \end{macrocode} |
| 372 |
% \end{macro} |
| 373 |
% |
| 374 |
% |
| 375 |
% \subsection{Option Declaration} |
| 376 |
% |
| 377 |
% \begin{macro}{bf} |
| 378 |
% \begin{macro}{it} |
| 379 |
% These options change the font used for ingredients. |
| 380 |
% \begin{macrocode} |
| 381 |
\DeclareOption{bf}{% |
| 382 |
\renewcommand*{\ingredientfont}{\bfseries}% |
| 383 |
}% |
| 384 |
\DeclareOption{it}{% |
| 385 |
\renewcommand*{\ingredientfont}{\itshape}% |
| 386 |
}% |
| 387 |
% \end{macrocode} |
| 388 |
% \end{macro} |
| 389 |
% \end{macro} |
| 390 |
% \begin{macro}{nopage} |
| 391 |
% \begin{macro}{newpage} |
| 392 |
% These options set up the hook that is executed at the end of each |
| 393 |
% recipe. |
| 394 |
% \begin{macrocode} |
| 395 |
\DeclareOption{nopage}{% |
| 396 |
\renewcommand*{\recipeendhook}{\@empty}% |
| 397 |
}% |
| 398 |
\DeclareOption{newpage}{% |
| 399 |
\renewcommand*{\recipeendhook}{\newpage}% |
| 400 |
}% |
| 401 |
% \end{macrocode} |
| 402 |
% \end{macro} |
| 403 |
% \end{macro} |
| 404 |
% |
| 405 |
% |
| 406 |
% \subsection{Option Processing} |
| 407 |
% |
| 408 |
% By default, italics are used for the ingredients and each recipe |
| 409 |
% starts on a new page. If you specify contradicting options |
| 410 |
% like~\option{[it,bf]}, the last one ``wins''. |
| 411 |
% \begin{macrocode} |
| 412 |
\ExecuteOptions{it,newpage}% |
| 413 |
\ProcessOptions*% |
| 414 |
% \end{macrocode} |
| 415 |
% |
| 416 |
% |
| 417 |
% \subsection{Defining Commands} |
| 418 |
% |
| 419 |
% \begin{macro}{\recipetitlefont} |
| 420 |
% Normally, the title of the recipe is typeset with the font used |
| 421 |
% also for the ingredients. It should be sufficient to use one |
| 422 |
% font for both kinds of text. |
| 423 |
% \begin{macrocode} |
| 424 |
\DeclareRobustCommand*{\recipetitlefont}{% |
| 425 |
\raggedright\large\ingredientfont |
| 426 |
}% |
| 427 |
% \end{macrocode} |
| 428 |
% \end{macro} |
| 429 |
% \begin{macro}{\recipetitle} |
| 430 |
% This command is used for the title of the recipe. There is no |
| 431 |
% need to use it directly because it will be called by the |
| 432 |
% \env{recipe}~environment automatically. Nevertheless I decided |
| 433 |
% not to make it an internal command because you will hack it |
| 434 |
% anyway. \winkey |
| 435 |
% \begin{macrocode} |
| 436 |
\DeclareRobustCommand*{\recipetitle}{% |
| 437 |
\@startsection{recipetitle}{1}{\recipemargin}% |
| 438 |
{3.5ex plus 1ex minus 0.2ex}{2.3ex plus 0.2ex}% |
| 439 |
{\recipetitlefont}*% |
| 440 |
}% |
| 441 |
% \end{macrocode} |
| 442 |
% \end{macro} |
| 443 |
% \begin{macro}{\energy} |
| 444 |
% \begin{macro}{\sidedish} |
| 445 |
% \begin{macro}{\hint} |
| 446 |
% \begin{macro}{\preparationtime} |
| 447 |
% \begin{macro}{\modification} |
| 448 |
% These commands will probably be redefined by everyone, even |
| 449 |
% german users. They are meant as examples for logical markup. |
| 450 |
% \begin{macrocode} |
| 451 |
\DeclareRobustCommand*{\energy}[1]{% |
| 452 |
\item Pro Portion ca.~#1\,kJ% |
| 453 |
}% |
| 454 |
\DeclareRobustCommand*{\sidedish}[1]{\item[Beilage] #1}% |
| 455 |
\DeclareRobustCommand*{\hint}[1]{\item[Tip] #1}% |
| 456 |
\DeclareRobustCommand*{\preparationtime}[1]{% |
| 457 |
\item[Zubereitungszeit] #1% |
| 458 |
}% |
| 459 |
\DeclareRobustCommand*{\modification}[1]{% |
| 460 |
\item[Abwandlung] #1% |
| 461 |
}% |
| 462 |
% \end{macrocode} |
| 463 |
% \end{macro} |
| 464 |
% \end{macro} |
| 465 |
% \end{macro} |
| 466 |
% \end{macro} |
| 467 |
% \end{macro} |
| 468 |
% \begin{macro}{\ingredient} |
| 469 |
% \cmd{\item}~commands are used for nearly everything. In order to |
| 470 |
% obtain a clearer logical markup, ingredients are typeset with |
| 471 |
% this command. It takes one mandatory argument, guess what: the |
| 472 |
% ingredient. The extra level of grouping makes life easier if you |
| 473 |
% want to use my \package{units} or \package{nicefrac}~package for |
| 474 |
% the ingredients. \smiley |
| 475 |
% \begin{macrocode} |
| 476 |
\DeclareRobustCommand*{\ingredient}[1]{\item[{#1}]}% |
| 477 |
% \end{macrocode} |
| 478 |
% \end{macro} |
| 479 |
% \begin{macro}{\@make@ingredient} |
| 480 |
% If the ingredient takes more than one line, the description of |
| 481 |
% what to do with it continues on the bottom-most line of the |
| 482 |
% ingredient column. By means of~|\hspace{0pt}| hyphenation of the |
| 483 |
% very first word in the ingredient column is |
| 484 |
% enabled~\cite[p.\,134]{Goossens:1994}. |
| 485 |
% \begin{macrocode} |
| 486 |
\DeclareRobustCommand*{\@make@ingredient}[1]{% |
| 487 |
\begin{minipage}[b]{\labelwidth}% |
| 488 |
\vspace{\parsep}% |
| 489 |
\raggedleft\ingredientfont\hspace{0pt}#1% |
| 490 |
\end{minipage}% |
| 491 |
}% |
| 492 |
% \end{macrocode} |
| 493 |
% \end{macro} |
| 494 |
% \begin{macro}{recipe} |
| 495 |
% This is the environment used for all the recipes. It takes one |
| 496 |
% mandatory argument, the title of the recipe, which is typeset |
| 497 |
% immediatly. |
| 498 |
% \begin{macrocode} |
| 499 |
\newenvironment{recipe}[1]{% |
| 500 |
\recipetitle{#1}% |
| 501 |
% \end{macrocode} |
| 502 |
% The recipe is typeset as a list. The left-hand column contains |
| 503 |
% the ingredients, the right-hand column the things to do with |
| 504 |
% these ingredients. The vertical spacing is quite compact. |
| 505 |
% \begin{macrocode} |
| 506 |
\begin{list}% |
| 507 |
{}% |
| 508 |
{% |
| 509 |
\setlength{\topsep}{0ex}% |
| 510 |
\setlength{\partopsep}{0ex}% |
| 511 |
\setlength{\leftmargin}{\recipemargin}% |
| 512 |
\setlength{\labelwidth}{\recipemargin}% |
| 513 |
\setlength{\labelsep}{1em}% |
| 514 |
\addtolength{\labelwidth}{-\labelsep}% |
| 515 |
\setlength{\itemsep}{0ex}% |
| 516 |
\renewcommand*{\makelabel}[1]{% |
| 517 |
\@make@ingredient{##1}% |
| 518 |
}% |
| 519 |
% \end{macrocode} |
| 520 |
% At the end of the environment the hook is executed. |
| 521 |
% \begin{macrocode} |
| 522 |
}% |
| 523 |
}{% |
| 524 |
\end{list}% |
| 525 |
% \recipeendhook |
| 526 |
}% |
| 527 |
% \end{macrocode} |
| 528 |
% \end{macro} |
| 529 |
% \begin{macro}{\ps@recipe} |
| 530 |
% The package also defines a pagestyle for recipes. It uses the |
| 531 |
% axis defined by~\cmd{\recipemargin} because a centered page |
| 532 |
% number does not work well with this layout. |
| 533 |
% \begin{macrocode} |
| 534 |
\DeclareRobustCommand*{\ps@recipe}{% |
| 535 |
\let\@mkboth\@gobbletwo |
| 536 |
\let\@oddhead\@empty |
| 537 |
\let\@evenhead\@empty |
| 538 |
\renewcommand*{\@oddfoot}{% |
| 539 |
\normalfont\hspace{\recipemargin}\thepage\hfill |
| 540 |
}% |
| 541 |
\let\@evenfoot\@oddfoot |
| 542 |
}% |
| 543 |
% \end{macrocode} |
| 544 |
% \end{macro} |
| 545 |
% \iffalse |
| 546 |
%</package> |
| 547 |
% \fi |
| 548 |
% \Finale |
| 549 |
% \iffalse |
| 550 |
%<*testfile> |
| 551 |
\documentclass[12pt,a4paper]{article} |
| 552 |
\usepackage[german]{babel} |
| 553 |
\usepackage{cooking,textcomp} |
| 554 |
\pagestyle{recipe} |
| 555 |
\begin{document} |
| 556 |
\begin{recipe}{Ungarischer Sauerkrautauf"|lauf (6~Portionen)} |
| 557 |
\ingredient{30\,g~Butter oder Margarine} zerlassen. |
| 558 |
\ingredient{500\,g~Sauerkraut} lo"cker zupfen, kurze Zeit im Fett |
| 559 |
erhitzen. |
| 560 |
\ingredient{125\,ml~Wasser} |
| 561 |
\ingredient{2~kleine Lorbeerbl"atter} hinzuf"ugen, mit |
| 562 |
\ingredient{Salz} |
| 563 |
\ingredient{frisch gemahlenem Pfeffer} |
| 564 |
\ingredient{1~Prise Zu"cker} w"urzen, das Sauerkraut gar d"unsten lassen |
| 565 |
(es darf keine Br"uhe mehr vorhanden sein). |
| 566 |
|
| 567 |
Das Sauerkraut mit Salz, Pfeffer und Zu"cker abschme"cken. |
| 568 |
\ingredient{500\,ml~Wasser} mit |
| 569 |
\ingredient{125\,g~Langkornreis (parboiled)} in den Topf geben, einige |
| 570 |
Minuten quellen lassen. |
| 571 |
\ingredient{1/2\,TL~Salz} zuf"ugen, Reis auf h"ochster Stufe zum Kochen |
| 572 |
bringen, etwa 2~Minuten kochen lassen. Herdplatte ausschalten und den |
| 573 |
Topf mit einem De"ckel bede"cken. Reis 15~Minuten quellen lassen, bis er |
| 574 |
das Wasser aufgenommen hat. |
| 575 |
|
| 576 |
Abtropfen lassen, mit kaltem Wasser "ubergie"sen, zum Auf"|lo"ckern |
| 577 |
umr"uhren. |
| 578 |
\ingredient{1~mittelgro"se Zwiebel} abziehen, w"urfeln. |
| 579 |
\ingredient{20\,g~Margarine} zerlassen, |
| 580 |
\ingredient{500\,g~Gehacktes (halb Rind"~, halb Schweinefleisch)} mit |
| 581 |
Salz und Pfeffer w"urzen, mit den Zwiebelw"ur"-feln in dem Fett unter |
| 582 |
st"andigem R"uhren anbraten, dabei die Fleischkl"umpchen mit einer Gabel |
| 583 |
zerdr"u"cken, dann den Reis unterheben. |
| 584 |
\ingredient{2~Rauchenden (200\,g)} waschen, in Scheiben |
| 585 |
schneiden. Sauerkraut, Gehacktes, Rauchenden abwechselnd lagenweise in |
| 586 |
eine gefettete Auf"|lauf"|form schichten, die oberste Schicht soll aus |
| 587 |
Sauerkraut bestehen. |
| 588 |
\ingredient{1~Becher (150\,g) Cr\`eme fra\^\i che} mit |
| 589 |
\ingredient{250\,ml~Schlagsahne} verr"uhren, "uber den Auf"|lauf gie"sen, |
| 590 |
mit |
| 591 |
\ingredient{20\,g~Semmelbr"oseln} bestreuen. |
| 592 |
\ingredient{25\,g~Butter} in Fl"ockchen darauf setzen. Die Form auf |
| 593 |
dem Rost in den Backofen schieben. Ober"~/""Unterhitze: |
| 594 |
220\,\textcelsius, Hei"sluft: 200\,\textcelsius. |
| 595 |
\item[Backzeit] Etwa 30~Minuten |
| 596 |
\sidedish{Br"otchen, Bier} |
| 597 |
\energy{3\,300} |
| 598 |
\end{recipe} |
| 599 |
\end{document} |
| 600 |
%</testfile> |
| 601 |
% \fi |
| 602 |
\endinput |