summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cooking/cooking.sty
blob: 95e8352ddfb520374241d3e2e03984785ce106ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
%%
%% This is file `cooking.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% cooking.dtx  (with options: `package')
%% 
%% LaTeX package for cooking recipes
%% 
%% Copyright (C) 1999 Axel Reichert
%% See the files README and COPYING.
%% 
%% \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         \~}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]%
\ProvidesPackage{cooking}[%
  1999/06/24 v0.9b Cooking recipes%
]%
\newlength{\recipemargin}%
\setlength{\recipemargin}{0.35\columnwidth}%
\DeclareRobustCommand*{\ingredientfont}{\@empty}%
\DeclareRobustCommand*{\recipeendhook}{\@empty}%
\DeclareOption{bf}{%
  \renewcommand*{\ingredientfont}{\bfseries}%
}%
\DeclareOption{it}{%
  \renewcommand*{\ingredientfont}{\itshape}%
}%
\DeclareOption{nopage}{%
  \renewcommand*{\recipeendhook}{\@empty}%
}%
\DeclareOption{newpage}{%
  \renewcommand*{\recipeendhook}{\newpage}%
}%
\ExecuteOptions{it,newpage}%
\ProcessOptions*%
\DeclareRobustCommand*{\recipetitlefont}{%
  \raggedright\large\ingredientfont
}%
\DeclareRobustCommand*{\recipetitle}{%
  \@startsection{recipetitle}{1}{\recipemargin}%
    {3.5ex plus 1ex minus 0.2ex}{2.3ex plus 0.2ex}%
    {\recipetitlefont}*%
}%
\DeclareRobustCommand*{\energy}[1]{%
  \item Pro Portion ca.~#1\,kJ%
}%
\DeclareRobustCommand*{\sidedish}[1]{\item[Beilage] #1}%
\DeclareRobustCommand*{\hint}[1]{\item[Tip] #1}%
\DeclareRobustCommand*{\preparationtime}[1]{%
  \item[Zubereitungszeit] #1%
}%
\DeclareRobustCommand*{\modification}[1]{%
  \item[Abwandlung] #1%
}%
\DeclareRobustCommand*{\ingredient}[1]{\item[{#1}]}%
\DeclareRobustCommand*{\@make@ingredient}[1]{%
  \begin{minipage}[b]{\labelwidth}%
    \vspace{\parsep}%
    \raggedleft\ingredientfont\hspace{0pt}#1%
  \end{minipage}%
}%
\newenvironment{recipe}[1]{%
  \recipetitle{#1}%
  \begin{list}%
    {}%
    {%
      \setlength{\topsep}{0ex}%
      \setlength{\partopsep}{0ex}%
      \setlength{\leftmargin}{\recipemargin}%
      \setlength{\labelwidth}{\recipemargin}%
      \setlength{\labelsep}{1em}%
      \addtolength{\labelwidth}{-\labelsep}%
      \setlength{\itemsep}{0ex}%
      \renewcommand*{\makelabel}[1]{%
        \@make@ingredient{##1}%
      }%
    }%
}{%
  \end{list}%
}%
\DeclareRobustCommand*{\ps@recipe}{%
  \let\@mkboth\@gobbletwo
  \let\@oddhead\@empty
  \let\@evenhead\@empty
  \renewcommand*{\@oddfoot}{%
    \normalfont\hspace{\recipemargin}\thepage\hfill
  }%
  \let\@evenfoot\@oddfoot
}%
\endinput
%%
%% End of file `cooking.sty'.