]> git.lyx.org Git - wiki-uploads.git/blob - Layouts/Recipebook/recipebook.layout
Import uploads from wiki
[wiki-uploads.git] / Layouts / Recipebook / recipebook.layout
1 #% Do not delete the line below; configure depends on this
2 #  \DeclareLaTeXClass[scrbook]{book (recipes)}
3 # Recipe textclass definition file.
4 # Based upon the CTAN:recipe.cls file, but it is not needed anymore
5 #   Author of recipe.cls: Maurizio Loreti, aka MLO or (HAM) I3NOO
6 #   EMail of recipe.cls author:  loreti@padova.infn.it
7 # Layout created by Sandor Szoke 2004.04.05
8 # Updated at 2006.12.10.
9 # Updated at 2008.10.19.
10 #  - Now use scrbook
11 #  - better look in LyX
12 #  - with short title the portion size can be given
13 # Contact: mailto:alex@lyx.hu
14 #
15 # The original instructions:
16 # The \part, \chapter, \section and \subsection commands
17 # work as usual; \subsubsection commands are used for
18 # ``recipes'' as units, and are not numbered but (by
19 # default) entered in the .toc file.
20 #
21 # The recipe (a.k.a. subsubsection header) is typeset in
22 # a style defined with the command \rechead; the default
23 # is Large, horizontally centered, bold sans-serif: and
24 # the user can change that setting with a suitable
25 # \renewcommand{\rechead} .
26 #
27 # If e.g. \section and \subsection commands are not used
28 # in the text, the large indentation of the \subsubsection
29 # items in the Table of Contents may be ugly; in that case,
30 # you should redefine appropriately \l@subsubsection .
31 # The book.cls definition is:
32 # \newcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} ;
33 # the second parameter (7.0em) is the initial skip, and
34 # the third (4.1em) is the length for the subsubsection
35 # number field (if the subsubsections are to be numbered).
36 # As an example, a redefinition of \l@subsubsection may look
37 # like:
38 # \makeatletter
39 # \renewcommand*\l@subsubsection{\@dottedtocline{3}{3em}{4.1em}}
40 # \makeatother
41 #
42 # A specific command \recipe{...} is defined as an alias
43 # for a \subsubsection{...} followed by two rules across
44 # the whole page and by a vertical space.
45 #
46 # Another command, \ingred{...}, is defined to typeset a
47 # list of ingredients (the \ldots) with the italic font,
48 # inside a ``quote'' environment and  after an ``ingredient
49 # header'' \inghead---empty by default, and that can be
50 # redefined by the user with, e.g., a
51 # \renewcommand{\inghead}{\textbf{Ingredients (4 persons)}:\ }
52 # (note the trailing space).
53 #
54
55 Format 4
56 Input scrclass.inc
57 Input numreport.inc
58
59 Sides                   1
60 Sides                   2
61 PageStyle               Headings
62
63 # There is no abstract environment in book.cls
64 NoStyle Abstract
65
66 # Global parameters.
67 SecNumDepth             2
68 TocDepth                3
69
70 Style Chapter
71   LabelString           "\thechapter"
72 End
73
74 Style Bibliography
75   TopSep                4
76   LabelString           "Bibliography"
77   LabelFont
78     Series              Bold
79     Size                Largest
80   EndFont
81 End
82
83 Preamble
84
85 \setcounter{secnumdepth}{2}     % subsubsections not numbered
86 \setcounter{tocdepth}{3}        % subsubsections in the .toc file
87
88 \newcommand{\rechead}
89     {\centering\normalfont\Large\sffamily\bfseries}
90
91 \renewcommand{\subsubsection}
92     {\@startsection{subsubsection}{3}{\z@}%
93     {-5ex\@plus -1ex \@minus -.2ex}%
94     {1.5ex \@plus .2ex}%
95     {\rechead}}
96
97 \newcommand{\recipe}[1]{\subsubsection{#1}%
98     \hrule height0.75pt width\hsize\vspace*{1\p@}%
99     \hrule height0.25pt width\hsize%
100     \nobreak
101     \vskip\parskip}
102
103 \newcommand{\inghead}[1][]{\large\textbf{Ingredients#1}:}
104 \newcommand{\ingred}[2][]
105     {{\list{}{\rightmargin 1em\leftmargin 1em}%
106     \item[]\textit{\inghead[#1]} #2\endlist}%
107     \hrule height0.25pt width\hsize}
108 EndPreamble
109
110 Style Recipe
111   LatexType             Command
112   LatexName             recipe
113   Margin                Static
114   LeftMargin            Ingredients_for_some:xx
115   LabelSep              xx
116   LabelType             Static
117   LabelString           "Recipe:"
118   Align                 Center
119   LabelFont
120     Family              Sans
121     Size                Large
122     Series              Bold
123     Shape               Italic
124     Color               red
125   EndFont
126 End
127
128 # Subsubsection style definition
129 Style Subsubsection
130   LatexType             Command
131   LatexName             subsubsection
132   ParSkip               0.4
133   TopSep                0.9
134   BottomSep             0.5
135   ParSep                0.5
136   Align                 Block
137   AlignPossible         Block
138   Font
139     Size                Small
140   EndFont
141 End
142
143 # Inghead style definition
144 Style Ingredients
145   LatexType             Command
146   LatexName             ingred
147   OptionalArgs          1
148   Margin                Static
149   LeftMargin            Ingredients_for_some:xx
150   LabelSep              xx
151   Align                 Left
152   AlignPossible         Left, Block
153   LabelType             Static
154   LabelString           "Ingredients:"
155   LabelFont
156     Series              Bold
157     Shape               Italic
158     Color               red
159   EndFont
160   Preamble
161    \renewcommand*\l@subsubsection{\@dottedtocline{3}{3em}{0em}}
162    \setlength\parindent{0pt}
163    \setlength\parskip{2ex plus 0.5ex}
164   EndPreamble
165 End