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