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