]> git.lyx.org Git - lyx.git/blob - lib/layouts/recipebook.layout
fix typos.
[lyx.git] / lib / layouts / recipebook.layout
1 #% Do not delete the line below; configure depends on this
2 #  \DeclareLaTeXClass[scrbook]{book (recipes)}
3 # Recipe textclass definition file.
4 # Author: Sandor Szoke (alex@lyx.hu)
5 #
6 # The \part, \chapter, \section and \subsection commands
7 # work as usual; \subsubsection commands are used for
8 # ``recipes'' as units, and are not numbered but (by
9 # default) entered in the .toc file.
10 #
11 # The recipe (a.k.a. subsubsection header) is typeset in
12 # a style defined with the command \rechead; the default
13 # is Large, horizontally centered, bold sans-serif: and
14 # the user can change that setting with a suitable
15 # \renewcommand{\rechead} .
16 #
17 # If e.g. \section and \subsection commands are not used
18 # in the text, the large indentation of the \subsubsection
19 # items in the Table of Contents may be ugly; for that case,
20 # we redefine \l@subsubsection .
21 #
22 # A specific command \recipe{...} is defined as an alias
23 # for a \subsubsection{...} followed by two rules across
24 # the whole page and by a vertical space.
25 #
26 # Another command, \ingred{...}, is defined to typeset a
27 # list of ingredients.
28
29 Format 11
30 Input scrclass.inc
31 Input numreport.inc
32
33 # Global parameters.
34 SecNumDepth             2
35 TocDepth                3
36 PageStyle               Headings
37
38 # There is no abstract environment in scrbook.cls
39 NoStyle Abstract
40
41 Style Chapter
42   LabelString           "\thechapter"
43 End
44
45 Style Bibliography
46   TopSep                4
47   LabelString           "Bibliography"
48   LabelFont
49     Series              Bold
50     Size                Largest
51   EndFont
52 End
53
54 Preamble
55 \newcommand{\rechead}
56     {\centering\normalfont\Large\sffamily\bfseries}
57
58 \renewcommand{\subsubsection}
59     {\@startsection{subsubsection}{3}{\z@}%
60     {-5ex\@plus -1ex \@minus -.2ex}%
61     {1.5ex \@plus .2ex}%
62     {\rechead}}
63
64 \newcommand{\recipe}[1]{\subsubsection{#1}%
65     \hrule height0.75pt width\hsize\vspace*{1\p@}%
66     \hrule height0.25pt width\hsize%
67     \nobreak
68     \vskip\parskip}
69
70 \newcommand{\inghead}[1][]{\large\textbf{Ingredients#1}:}
71 \newcommand{\ingred}[2][]
72     {{\list{}{\rightmargin 1em\leftmargin 1em}%
73     \item[]\textit{\inghead[#1]} #2\endlist}%
74     \hrule height0.25pt width\hsize}
75 EndPreamble
76
77 Style Recipe
78   LatexType             Command
79   LatexName             recipe
80   Margin                Static
81   LeftMargin            Ingredients_for_some:xx
82   LabelSep              xx
83   LabelType             Static
84   LabelString           "Recipe:"
85   Align                 Center
86   LabelFont
87     Family              Sans
88     Size                Large
89     Series              Bold
90     Shape               Italic
91     Color               red
92   EndFont
93 End
94
95 # Subsubsection style definition
96 Style Subsubsection
97   LatexType             Command
98   LatexName             subsubsection
99   ParSkip               0.4
100   TopSep                0.9
101   BottomSep             0.5
102   ParSep                0.5
103   Align                 Block
104   AlignPossible         Block
105   Font
106     Size                Small
107   EndFont
108 End
109
110 # Inghead style definition
111 Style Ingredients
112   LatexType             Command
113   LatexName             ingred
114   OptionalArgs          1
115   Margin                Static
116   LeftMargin            Ingredients_for_some:xx
117   LabelSep              xx
118   Align                 Left
119   AlignPossible         Left, Block
120   LabelType             Static
121   LabelString           "Ingredients:"
122   LabelFont
123     Series              Bold
124     Shape               Italic
125     Color               red
126   EndFont
127   Preamble
128    \renewcommand*\l@subsubsection{\@dottedtocline{3}{3em}{0em}}
129    \setlength\parindent{0pt}
130    \setlength\parskip{2ex plus 0.5ex}
131   EndPreamble
132 End