]> git.lyx.org Git - lyx.git/blob - lib/layouts/recipebook.layout
Missing dot.
[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 30
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         TocLevel 0
44 End
45
46 Style Bibliography
47   TopSep                4
48   LabelString           "Bibliography"
49   LabelFont
50     Series              Bold
51     Size                Largest
52   EndFont
53 End
54
55 Preamble
56 \newcommand{\rechead}
57     {\centering\normalfont\Large\sffamily\bfseries}
58
59 \renewcommand{\subsubsection}
60     {\@startsection{subsubsection}{3}{\z@}%
61     {-5ex\@plus -1ex \@minus -.2ex}%
62     {1.5ex \@plus .2ex}%
63     {\rechead}}
64
65 \newcommand{\recipe}[1]{\subsubsection{#1}%
66     \hrule height0.75pt width\hsize\vspace*{1\p@}%
67     \hrule height0.25pt width\hsize%
68     \nobreak
69     \vskip\parskip}
70
71 \newcommand{\inghead}[1][]{\large\textbf{Ingredients#1}:}
72 \newcommand{\ingred}[2][]
73     {{\list{}{\rightmargin 1em\leftmargin 1em}%
74     \item[]\textit{\inghead[#1]} #2\endlist}%
75     \hrule height0.25pt width\hsize}
76 EndPreamble
77
78 Style Recipe
79   LatexType             Command
80   LatexName             recipe
81   Margin                Static
82   LeftMargin            Ingredients_for_some:xx
83   LabelSep              xx
84   LabelType             Static
85   LabelString           "Recipe:"
86   Align                 Center
87   LabelFont
88     Family              Sans
89     Size                Large
90     Series              Bold
91     Shape               Italic
92     Color               red
93   EndFont
94 End
95
96 # Subsubsection style definition
97 Style Subsubsection
98   LatexType             Command
99   LatexName             subsubsection
100   ParSkip               0.4
101   TopSep                0.9
102   BottomSep             0.5
103   ParSep                0.5
104   Align                 Block
105   AlignPossible         Block
106   Font
107     Size                Small
108   EndFont
109         TocLevel 3
110 End
111
112 # Inghead style definition
113 Style Ingredients
114   LatexType             Command
115   LatexName             ingred
116   OptionalArgs          1
117   Margin                Static
118   LeftMargin            Ingredients_for_some:xx
119   LabelSep              xx
120   Align                 Left
121   AlignPossible         Left, Block
122   LabelType             Static
123   LabelString           "Ingredients:"
124   LabelFont
125     Series              Bold
126     Shape               Italic
127     Color               red
128   EndFont
129   Preamble
130    \renewcommand*\l@subsubsection{\@dottedtocline{3}{3em}{0em}}
131    \setlength\parindent{0pt}
132    \setlength\parskip{2ex plus 0.5ex}
133   EndPreamble
134 End