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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
|
%\iffalse meta-comment
%<*copyright>
%% ------------------- cookybooky.dtx package ------------------- %%
%% %%
%% ------ Copyright (C) 2009 by J. Gilg <gilg@acrotex.net> ------ %%
%% %%
%% This work may be distributed and/or modified under the %%
%% conditions of the LaTeX Project Public License (LPPL), %%
%% 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. %%
%% %%
%% This work has the LPPL maintenance status `maintained'. %%
%% %%
%% The Current Maintainer of this work is J. Gilg. %%
%% %%
%% This work consists of the files %%
%% cookybooky.dtx, %%
%% cookybooky.ins, and the derived files %%
%% cookybooky.sty and myRecipe.cfg. %%
%% %%
%% ------------------ Some additional hints --------------------- %%
%% %%
%% A proper documentation of this package is found in the %%
%% folder <cookybooky/documentation> called `Manual.pdf'. %%
%% %%
%% Demo graphics are within <cookybooky/examples/graphics>. %%
%% %%
%% Example files are found within <cookybooky/examples>. %%
%% %%
%% -------------------------------------------------------------- %%
%</copyright>
% \begin{macrocode}
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cookybooky}%
[2009/10/10 v0.1 dtx: Easy typesetting recipes (jg)]
%</package>
% \end{macrocode}
%<*driver>
\documentclass[a4paper]{ltxdoc}
\usepackage[T1]{fontenc}
\usepackage{bookman}
\usepackage{amsmath,amssymb}
\usepackage[%
gopro,
web={dvips,latextoc,usetemplates,nodirectory,nobullets,pro,dvipsnames}
]{aeb_pro}
\usepackage[dvipsnames]{xcolor}
\definecolor{webblue}{rgb}{0,0,.8}
\DeclareDocInfo
{%
title= Typesetting Recipes,
university=Documentation,
author=J\"{u}rgen Gilg,
email=gilg@acrotex.net,
subject=Recipes easily typeset with LaTeX,
%talksite=\url{www.acrotex.net},
%version=1.0,
keywords={LaTeX, Cooking, Recipes},
copyrightStatus=True,
copyrightNotice={Copyright (C) \the\year, J\u00FCrgen Gilg},
copyrightInfoURL=http://www.acrotex.net
}
\selectColors
{%
titleColor=black,
authorColor=black,
linkColor=black,
universityColor=Orange
}
\titleLayout
{%
fontsize=Huge,
halign=r,
xhalign=r
}
\authorLayout{%
fontsize=Large,
halign=r,
xhalign=r
}
\universityLayout{%
fontsize=Huge,
halign=r,
xhalign=r
}
\sectionLayout{%
indent=-20pt,
fontsize=Large,
color=gray
}
\subsectionLayout{%
indent=-20pt,
fontsize=large,
color=gray
}
\subsubsectionLayout{%
indent=-20pt,
fontsize=large,
color=gray
}
\screensize{297mm}{210mm} % height, width
\margins{.5in}{.25in}{1in}{1in} % left, right, top, bottom
\useFullWidthForPaper
\setlength\parindent{0pt}
\setlength\parskip{1ex plus 0.5ex}
\newcommand{\bkm}{%
\fontencoding{T1}\fontfamily{pbk}\selectfont
}
\optionalPageMatter{%
\parbox{\linewidth}{\itshape
\begin{center}
%\Huge\texttt{\textcolor{gray}{\textbf{cookybooky}}}
\end{center}
\large\setlength\parindent{0pt}
\setlength\parskip{2ex plus 0.5ex}
This package is dedicated to my little almost four year old buddy \textsc{Paul~Henry}, who likes to cook with me and is always interested in how and what we cook together (and what is even better -- he as well helps to do the dishes afterwards).
So I decided to write some macros to typeset recipes in an eye-pleasing way (with additional pictures), to archive the recipes we cooked and in future will cook and to someday bundle them together to a very personal recipe book and give it to \textsc{Paul~Henry} (when he will be able to read it), to remember the nice and funny times we had in the kitchen -- and of course -- to recook the recipes we tested out.
I never wrote any \LaTeX{} package before, so I tried to give my best and the result looks better than awaited.
Many thanks go to \textsc{D.\,P.~Story} and \textsc{Herbert Vo{\ss}} who patiently helped me, whenever I had some questions. I guess, they won't forget diverse emails, where the subject was ``little q'' or ``Kleine Anfrage'' \ldots
}}
\pagenumbering{arabic}
\setlength{\parindent}{0cm}
%\setlength{\mathindent}{1cm}
\setlength{\textwidth}{15.5cm}
\setlength{\textheight}{24.7cm}
\setlength{\topmargin}{-0.8cm}
\setlength{\headheight}{0cm}
\setlength{\headsep}{1cm}
\setlength{\topskip}{0cm}
\setlength{\footskip}{1.4cm}
\setlength{\evensidemargin}{-0.5cm}
\setlength{\oddsidemargin}{0.5cm}
\setlength{\paperheight}{29.7cm}
\setlength{\paperwidth}{21cm}
\setlength{\voffset}{0cm}
\setlength{\hoffset}{0cm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]%
{\markright{\thesection.\ #1}}
\renewcommand{\headrulewidth}{0.0pt}
\fancyhf{}
\fancyfoot[LE,RO]{\textcolor{gray}{\bf{\bkm{\thepage}}}}
\fancyhead[LE,RO]{\textcolor{Orange}{\itshape\bkm{\rightmark}}}
%left always EVEN, right always ODD
\OnlyDescription % comment out for implementation details
%\RecordChanges
\EnableCrossrefs
\CodelineIndex
\begin{document}
\GetFileInfo{cookybooky.sty}
\title{\textcolor{gray}{\Huge{\emph{cookybooky}}}\\ \Large{Easily typesetting recipes for \LaTeX/PDF}}
\author{J\"{u}rgen Gilg\\
\texttt{gilg@acrotex.net}}
\date{processed \today}
\maketitle
\tableofcontents
\newpage
\let\Email\texttt
\DocInput{cookybooky.dtx}
% \PrintChanges
% \PrintIndex
\end{document}
%</driver>
%\fi
% \changes{v0.1}{2009/10/10}{Initial version}
% \newpage
%\section{Introduction}
%This is a simple style file that typesets recipes in a quite eye-pleasing layout. The \texttt{article} class is used and there is a switch set for the %\texttt{twoside} option.
%
%The layout is simply set with minipages -- arranged in a kind of \emph{two-column-style}. The kind of two columns are in a defined ratio which is not %$\text{1}:\text{1}$, that makes the layout look more pleasant for the eyes, but forces some ideas in how to arrange them properly on even and odd pages vice %versa.
%
%The main idea is a simple routine, that arranges the minipages with an \texttt{if/else} routine that asks for even or odd pagenumber and then arranges them %appropriately.
%
%The first two-pack of minipages is placed on top of the page and contains two graphics (a \emph{small} one and a \emph{bigger} one).
%
%The second two-pack of minipages is placed below the graphics -- one of these minipages is empty -- and the other contains the \emph{recipe name}, the %\emph{cooking time} of the recipe, the \emph{portion} (for how many eaters is this recipe calculated) and the \emph{energy} the food delivers.
%
%The third two-pack of minipages is placed there below and contains the \emph{ingredients} and the \emph{preparation} of the recipe followed by a \emph{hint} at the %bottom, where some additional hints to the recipe can be typeset.
%
%Behind this structure of minipages, a background template -- if wanted with a smooth transparency setup -- can be used, as well as the recipe name in huge %transparent letters to bring in an additional special effect. This template managment and all the transparency stuff made me look for packages that are easy to %handle and smart to use. That's why the list of the required packages is quite long.
%
%The input mask for the recipes however is very easy to handle. Just a few commands with key-value-pairs and some other commands, which all will be explained in the %following sections. The setting of the page is then done automatically.
%
%\subsection{Required packages}
% In this section, the required packages are inserted with some options already specified.
% \begin{macrocode}
%<*package>
% \end{macrocode}
% \begin{macrocode}
\DeclareOption{myconfig}{\AtEndOfPackage{\inputmyRecipe}}
\def\inputmyRecipe{\InputIfFileExists{myRecipe.cfg}
{\typeout{inputting myRecipe.cfg}}{cannot find myRecipe.cfg}}
\PassOptionsToPackage{distiller}{pstricks}
\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
\ProcessOptions
\RequirePackage{amsmath,amssymb}
\RequirePackage[%
dvips,
latextoc,
usetemplates,
nodirectory,
nobullets,
pro
]{web}
\RequirePackage[dvips]{graphicxsp}
\RequirePackage{xkeyval}
\RequirePackage{lettrine}
\RequirePackage{pstricks}
\RequirePackage{pst-text}
\RequirePackage[absolute,notitlepage]{pst-abspos}
\RequirePackage{nicefrac}
\RequirePackage{fancyhdr}
% \end{macrocode}
%\section{Page dimensions}
% The following three commands come from the \texttt{web} package to set the dimensions and margins to the pages.
% \begin{macrocode}
% \end{macrocode}
% \begin{macro}{\screensize}
% \verb!\screensize! sets the height and the width of the page.
% \begin{macrocode}
\screensize{297mm}{210mm} % height, width
% \end{macrocode}
% \end{macro}
% \begin{macro}{\margins}
% \verb!\margins! sets the margins in the order left, right, top, bottom.
% \begin{macrocode}
\margins{.5in}{.25in}{1in}{1in} % left, right, top, bottom
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\useFullWidthForPaper
% \end{macrocode}
%\subsection{Page layout}
% The following commands come from \LaTeX, and are set for a proper layout for a recipe book.
% \begin{macrocode}
\pagenumbering{arabic}
\setlength{\parindent}{0cm}
%\setlength{\mathindent}{1cm}
\setlength{\textwidth}{15.5cm}
\setlength{\textheight}{24.7cm}
\setlength{\topmargin}{-0.8cm}
\setlength{\headheight}{0cm}
\setlength{\headsep}{1cm}
\setlength{\topskip}{0cm}
\setlength{\footskip}{1.4cm}
\setlength{\evensidemargin}{-0.5cm}
\setlength{\oddsidemargin}{0.5cm}
\setlength{\paperheight}{29.7cm}
\setlength{\paperwidth}{21cm}
\setlength{\voffset}{0cm}
\setlength{\hoffset}{0cm}
% \end{macrocode}
% Here some redefinitions for the table of contents.
% \begin{macrocode}
\setcounter{secnumdepth}{2} % subsubsections not numbered
\setcounter{tocdepth}{3} % subsubsections in the .toc file
\renewcommand*\l@subsubsection
{%
\@dottedtocline{3}{3em}{0em}
}
% \end{macrocode}
%\section{Color managment}
% \begin{macro}{\selectRecipeColors}
% Here some colors are defined for the recipe name, the ingredient heading, the ingredient text, the preparation heading, the line color for the hint, the color for % the transparent recipe name in the middle of the page and the color for the initials in the items of the preparation.
% \begin{macrocode}
\define@key{colorManagment}{recipecolor}[webgreen]{\def\recipecolor{#1}}
\define@key{colorManagment}{ingredcolor}[gray]{\def\ingredcolor{#1}}
\define@key{colorManagment}{ingheadcolor}[gray]{\def\ingheadcolor{#1}}
\define@key{colorManagment}{prepheadcolor}[black]{\def\prepheadcolor{#1}}
\define@key{colorManagment}{linecolor}[red]{\def\linecolor{#1}}
\define@key{colorManagment}{recipecolorop}[webgreen]{\def\recipecolorop{#1}}
\define@key{colorManagment}{initialscolor}[red]{\def\initialscolor{#1}}
% \end{macrocode}
% The keys are defined with some commands from the \texttt{xkeyval} package.
% \begin{macrocode}
\savekeys{colorManagment}
{%
recipecolor,
ingredcolor,
ingheadcolor,
prepheadcolor,
linecolor,
recipecolorop,
initialscolor
}
% \end{macrocode}
% Now the keys are saved.
% \begin{macrocode}
\newcommand*{\selectRecipeColors}[1][]
{%
\setkeys{colorManagment}{#1}
}
% \end{macrocode}
% The command \verb!\selectRecipeColor! is defined and setup with the keys defined above.
% \begin{macrocode}
\selectRecipeColors
[%
recipecolor,
ingredcolor,
ingheadcolor,
prepheadcolor,
linecolor,
recipecolorop,
initialscolor
]
% \end{macrocode}
% The keys are setup with their default values.
% \begin{macrocode}
\selectRecipeColors
[%
recipecolor = webgreen,
ingredcolor = gray,
ingheadcolor = gray,
prepheadcolor = black,
linecolor = red,
recipecolorop = webgreen,
initialscolor = red
]
% \end{macrocode}
% The keys are setup with some individual colors (these could be other colors than the default).
% \end{macro}
%\section{Font managment}
% \begin{macro}{\selectFont}
%In this section is described, how a \emph{handwriting font} for transparent letters is implemented.
% \begin{macrocode}
% \end{macrocode}
% Here a choice key is defined -- either \texttt{hlce}, \texttt{pbsi} or \texttt{hlcw} are possible values for that key. The keys then are saved and setup.
% \begin{macrocode}
\define@choicekey{fontManagment}{font}%
{hlce,pbsi,hlcw}[pbsi]{\def\thefont{#1}}
\savekeys{fontManagment}{font}
\newcommand*{\selectFont}[1][]
{%
\setkeys{fontManagment}{#1}
}
\selectFont
[%
% font = hlce
% font = pbsi
font = hlcw
]
% \end{macrocode}
%Here is defined the fontencoding of the three preset handwriting fonts: Brushscript, Lucida Handwriting and Lucida Calligraphy.
% \begin{macrocode}
\newcommand{\bsi}[2]
{%
\fontencoding{T1}
\fontfamily{\thefont}
\fontseries{xl}
\fontshape{n}%
\fontsize{#1}{#2}
\selectfont
}
% \end{macrocode}
% \end{macro}
%\section{The major commands}
%\subsection{The \cs{init} command}
% \begin{macro}{\init}
% The \verb!\init! defines a command, that sets some initials at the beginning of a paragraph. Especially for this package this nice effect is used to enumerate the % preparation text of the recipe. The \texttt{lettrine} package is used to manage that.
% \begin{macrocode}
\newcounter{init}\setcounter{init}{0}
\renewcommand{\LettrineFontHook}
{%
\color{\initialscolor}
}
\newcommand{\init}
{%
\lettrine
[%
lines=2,
lhang=0.53,
loversize=0.15,
nindent=13pt
]{\stepcounter{init}\theinit}{\quad}
}
% \end{macrocode}
% \end{macro}
%\subsection{The commands to be redefined by the customer}
% The following three commands can be redefined by the user to add another language or some other words. The redefinitions are done with \verb!\renewcommand ...!.
% \begin{macrocode}
\newcommand{\inghead}
{%
\textcolor{\ingheadcolor}{\textbf{Zutaten}\ }
}
\newcommand{\prephead}
{%
\textcolor{\prepheadcolor}{\textbf{Zubereitung}\ }
}
\newcommand{\hinthead}
{%
\textcolor{\linecolor}{\Large{Tip:}}
}
% \end{macrocode}
%\subsection{The \cs{ingredients} command}
% \begin{macro}{\ingredients}
% This command sets up the ingredients in a 3-column tabular.
% \begin{macrocode}
\newcommand*{\ingredients}[1]
{%
\def\myingredients
{%
\textcolor{\ingheadcolor}{\inghead}
\\[4pt]
\footnotesize\color{\ingredcolor}
\begin{tabular}{rll}
#1
\end{tabular}
}
}
% \end{macrocode}
% \end{macro}
%\subsection{The \cs{preparation} command}
% \begin{macro}{\preparation}
% This command delivers and enumerated list for the preparation text for the recipe. The paragraphs are setup with initials.
% \begin{macrocode}
\newcommand*{\preparation}[1]
{%
\def\mypreparation
{%
\prephead
\\[4pt]
#1
}
\setcounter{init}{0}
}
% \end{macrocode}
% \end{macro}
%\subsection{The \cs{hint} command}
% \begin{macro}{\hint}
% This command gives the possibility to add a hint for the recipe at the bottom of the page.
% \begin{macrocode}
\newcommand*{\hint}[1]
{%
\def\myhint
{%
\psline[linecolor=\linecolor,linewidth=1.5pt](-0.5,0)(2,0)
\psline[linecolor=\linecolor,linewidth=1.5pt](-0.25,0.25)(-0.25,-1.75)
\hinthead
\begin{minipage}{\linewidth}%
\itshape#1
\end{minipage}
}
}
% \end{macrocode}
% \end{macro}
%\subsection{The \cs{graph} command}
% This is the most complex command, that arranges the minipages and inserts all the commands defined above, that's why this command needs to be typed last in a
%recipe.
% We start with the definition of some keys and then save the keys and give them the default values.
% \begin{macrocode}
\define@key{graph}{sgraph}[sgraph]{\def\sgraph{#1}}
\define@key{graph}{sdx}[0]{\def\sdx{#1}}
\define@key{graph}{sdy}[0]{\def\sdy{#1}}
\define@key{graph}{bgraph}[bgraph]{\def\bgraph{#1}}
\define@key{graph}{bdx}[0]{\def\bdx{#1}}
\define@key{graph}{bdy}[0]{\def\bdy{#1}}
\define@key{graph}{recipename}[TestRecipe]{\def\recipename{#1}}
\define@key{graph}{recipetime}[TesTime]{\def\recipetime{#1}}
\define@key{graph}{portion}[TestPortion]{\def\portion{#1}}
\define@key{graph}{joule}[TestEnergy]{\def\joule{#1}}
\savekeys{graph}
{%
sgraph,
sdx,
sdy,
bgraph,
bdx,
bdy,
recipename,
recipetime,
portion,
joule
}
\newcommand*{\graphic}[1][]
{%
\setkeys{graph}{#1}
}
\graphic
[%
recipename,
recipetime,
portion,
joule,
sgraph,
sdx,
sdy,
bgraph,
bdx,
bdy
]
% \end{macrocode}
% \begin{macro}{\graphPath}
% This is a command that can enter a path to the folder, where the graphics are located, e.~g \verb!\def\graphPath{/graphics}! gives the relative path from where %the \texttt{.tex} file is located. Note, that the graph is given with slashes and not backslashes.
% \begin{macrocode}
\def\graphPath{}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
%% DECLARATION OF THE WIDTHS OF THE MINIPAGES
\def\lwA{0.60\linewidth}%
\def\lwB{0.35\linewidth}
% \end{macrocode}
% \begin{macro}{\graph}
% Here we finally start the \verb!\graph! command.
% \begin{macrocode}
\newcommand*{\graph}[1][]
{%
\setkeys{graph}{#1}
{%
\if@twoside
\ifodd\arabic{page}
%% FIRST MINIPAGEBLOCK
\begin{minipage}[t]{\lwA}
\begin{pspicture*}(0,0)(\linewidth,6)
\rput[lb](\bdx,\bdy){\includegraphics[width=\linewidth]%
{\graphPath\bgraph}}
\end{pspicture*}
\end{minipage}
\hfill
\begin{minipage}[t]{\lwB}
\begin{pspicture*}(0,0)(\linewidth,6)
\rput[lb](\sdx,\sdy){\includegraphics[height=6cm]%
{\graphPath\sgraph}}
\end{pspicture*}
\end{minipage}
%% SECOND MINIPAGEBLOCK
\begin{minipage}[t]{\lwA}
\parbox[t]{\lwA}{\subsubsection[\normalsize\recipename]%
{\textcolor{\recipecolor}{\bsi{24pt}{30pt}\recipename}}}
\\[14pt]
\parbox[t]{\lwA}{%
\recipetime
\portion
\joule}
\end{minipage}
\hfill
\begin{minipage}[t]{\lwB}
%EMPTY MINIPAGE
\end{minipage}
%% THIRD MINIPAGEBLOCK
\begin{minipage}[t]{\lwA}
\mypreparation\
\end{minipage}
\hfill
\begin{minipage}[t]{\lwB}
\myingredients\
\end{minipage}
\vfill
\myhint
\else
\begin{minipage}[t]{\lwB}
\begin{pspicture*}(0,0)(\linewidth,6)
\rput[lb](\sdx,\sdy){\includegraphics[height=6cm]%
{\graphPath\sgraph}}
\end{pspicture*}
\end{minipage}
\hfill
\begin{minipage}[t]{\lwA}
\begin{pspicture*}(0,0)(\linewidth,6)
\rput[lb](\bdx,\bdy){\includegraphics[width=\linewidth]%
{\graphPath\bgraph}}
\end{pspicture*}
\end{minipage}
\begin{minipage}[t]{\lwB}
%EMPTY MINIPAGE
\end{minipage}
\hfill
\begin{minipage}[t]{\lwA}
\parbox[t]{\lwA}{\subsubsection[\normalsize\recipename]%
{\textcolor{\recipecolor}{\bsi{24pt}{30pt}\recipename}}}
\\[14pt]
\parbox[t]{\lwA}{%
\recipetime
\portion
\joule}
\end{minipage}
\begin{minipage}[t]{\lwB}
\myingredients\
\end{minipage}
\hfill
\begin{minipage}[t]{\lwA}
\mypreparation\
\end{minipage}
\vfill
\myhint
\fi
\else
\begin{minipage}[t]{\lwA}
\begin{pspicture*}(0,0)(\linewidth,6)
\rput[lb](\bdx,\bdy){\includegraphics[width=\linewidth]%
{\graphPath\bgraph}}
\end{pspicture*}
\end{minipage}
\hfill
\begin{minipage}[t]{\lwB}
\begin{pspicture*}(0,0)(\linewidth,6)
\rput[lb](\sdx,\sdy){\includegraphics[height=6cm]%
{\graphPath\sgraph}}
\end{pspicture*}
\end{minipage}
\begin{minipage}[t]{\lwA}
\parbox[t]{\lwA}{\subsubsection[\normalsize\recipename]%
{\textcolor{\recipecolor}{\bsi{24pt}{30pt}\recipename}}}
\\[14pt]
\parbox[t]{\lwA}{%
\recipetime
\portion
\joule}
\end{minipage}
\hfill
\begin{minipage}[t]{\lwB}
%EMPTY MINIPAGE
\end{minipage}
\begin{minipage}[t]{\lwA}
\mypreparation\
\end{minipage}
\hfill
\begin{minipage}[t]{\lwB}
\myingredients\
\end{minipage}
\vfill
\myhint\nopagebreak
\fi
%% TRANSPARENT SUBSUBSECTION NAME IN THE MIDDLE OF THE PAGE
\def\transpCoeff{0.3}
\pstPutAbs(0.5\paperwidth,-0.5\paperheight){%
\rput(0,0){\parbox{\linewidth}{\centering%
\pscharpath[linestyle=none,fillstyle=solid,fillcolor=\recipecolorop,opacity=\transpCoeff]{%
{\bsi{60pt}{75pt}\recipename}}}}
}
}
}
% \end{macrocode}
% \end{macro}
%\section{Headers and footers}
% In this section there is the header/footer management setup with the \texttt{fancyhdr} package.
% \begin{macrocode}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]
{%
\markright{\MakeUppercase{\thesection.\ #1}}
}
\renewcommand{\headrulewidth}
{%
0.5pt
}
\fancyhf{}
\fancyfoot[LE,RO]{\bf{\thepage}}
\fancyhead[LE,RO]{\rightmark}
%left always EVEN, right always ODD
% \end{macrocode}
% \begin{macrocode}
%</package>
% \end{macrocode}
%\section{The customer's configuration file \texttt{myRecipe.cfg}}
% This is a \emph{helper file} for the customer, where some personal preferences in configuration, like headings, color specifications, etc. can easily be preset. %They are loaded when the option \verb!myconfig! is used (\verb!\usepackage[myconfig]{cookybooky}!).
% \begin{macrocode}
%<*config>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ----------- my custom settings -------------- %%
%% %%
%% This file is made to setup your personal %%
%% settings, like colors, headings, font, etc. %%
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Here the redefinitions for the headings %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\inghead}
{%
\textcolor{\ingheadcolor}{\textbf{Ingredients}\ }
}
\renewcommand{\prephead}
{%
\textcolor{\prepheadcolor}{\textbf{Preparation}\ }
}
\renewcommand{\hinthead}
{%
\textcolor{\linecolor}{\Large{Hint:}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Here the redefinitions for the colors and some %%
%% new defined colors. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{customred}{rgb}{0.97,0.25,0.00}
\def\transpCoeff{0.3}
\selectRecipeColors
[%
recipecolor = webgreen,
ingredcolor = gray,
ingheadcolor = gray,
prepheadcolor = black,
linecolor = customred,
recipecolorop = webgreen,
initialscolor = red
]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Here the selction of the handwriting font. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\selectFont
[%
%% font = hlce
%% font = pbsi
font = hlcw
]
%</config>
% \end{macrocode}
% \Finale
\endinput
|