]> git.lyx.org Git - lyx.git/blob - lib/layouts/recipebook.layout
New Theorems Module. Contributed by Udicoudco <udifoglle@gmail.com> on the mailing...
[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 99
31 Input scrclass.inc
32 Input numreport.inc
33
34 # Global parameters.
35 SecNumDepth             2
36 TocDepth                3
37 PageStyle               Headings
38 DocBookRoot             book
39
40 # There is no abstract environment in scrbook.cls
41 NoStyle Abstract
42
43 Style Chapter
44   LabelString           "\thechapter"
45   TocLevel              0
46 End
47
48 Style Bibliography
49   TopSep                4
50   LabelString           "Bibliography"
51   LabelFont
52     Series              Bold
53     Size                Largest
54   EndFont
55   TocLevel              0
56 End
57
58 Preamble
59 \newcommand{\rechead}
60     {\centering\normalfont\Large\sffamily\bfseries}
61
62 \renewcommand{\subsubsection}
63     {\@startsection{subsubsection}{3}{\z@}%
64     {-5ex\@plus -1ex \@minus -.2ex}%
65     {1.5ex \@plus .2ex}%
66     {\rechead}}
67
68 \newcommand{\recipe}[1]{\subsubsection{#1}%
69     \hrule height0.75pt width\hsize\vspace*{1\p@}%
70     \hrule height0.25pt width\hsize%
71     \nobreak
72     \vskip\parskip}
73
74 \newcommand{\inghead}[1][]{\large\textbf{Ingredients#1}:}
75 \newcommand{\ingred}[2][]
76     {{\list{}{\rightmargin 1em\leftmargin 1em}%
77     \item[]\textit{\inghead[#1]} #2\endlist}%
78     \hrule height0.25pt width\hsize}
79 EndPreamble
80
81 Style Recipe
82   LatexType             Command
83   LatexName             recipe
84   Margin                Static
85   LeftMargin            Ingredients_for_some:xx
86   LabelSep              xx
87   LabelType             Static
88   LabelString           "Recipe:"
89   Align                 Center
90   LabelFont
91     Family              Sans
92     Size                Large
93     Series              Bold
94     Shape               Italic
95     Color               textlabel3
96   EndFont
97   DocBookTag    bridgehead
98   DocBookAttr   renderas='sect2'
99   DocBookTagType paragraph
100 End
101
102 # Subsubsection style definition
103 Style Subsubsection
104   LatexType             Command
105   LatexName             subsubsection
106   ParSkip               0.4
107   TopSep                0.9
108   BottomSep             0.5
109   ParSep                0.5
110   Align                 Block
111   AlignPossible         Block
112   Font
113     Size                Small
114   EndFont
115   TocLevel              3
116 End
117
118 # Inghead style definition
119 Style Ingredients
120   LatexType             Command
121   LatexName             ingred
122   Argument 1
123     LabelString         "Ingredients Header"
124     Tooltip             "Specify an optional ingredients header"
125   EndArgument
126   Margin                Static
127   LeftMargin            Ingredients_for_some:xx
128   LabelSep              xx
129   Align                 Left
130   AlignPossible         Left, Block
131   LabelType             Static
132   LabelString           "Ingredients:"
133   LabelFont
134     Series              Bold
135     Shape               Italic
136     Color               textlabel3
137   EndFont
138   Preamble
139    \renewcommand*\l@subsubsection{\@dottedtocline{3}{3em}{0em}}
140    \setlength\parindent{0pt}
141    \setlength\parskip{2ex plus 0.5ex}
142   EndPreamble
143   DocBookTag    para
144   DocBookAttr   role='ingredients'
145 End