new layout and example file to typeset recipes also for branch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28016 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2009-01-07 01:54:21 +00:00
parent 48f43ae86a
commit 34b324dfd1
6 changed files with 496 additions and 0 deletions

View File

@ -29,6 +29,7 @@ Function UpdateModifiedFiles
#File "${PRODUCT_SOURCEDIR}\Resources\doc\fr\UserGuide.lyx"
SetOutPath "$INSTDIR\Resources\examples"
File "${PRODUCT_SOURCEDIR}\Resources\examples\biblioExample.bib"
File "${PRODUCT_SOURCEDIR}\Resources\examples\recipebook.lyx"
SetOutPath "$INSTDIR\Resources\layouts"
File "${PRODUCT_SOURCEDIR}\Resources\layouts\acmsiggraph.layout"
File "${PRODUCT_SOURCEDIR}\Resources\layouts\hanging.module"

View File

@ -2361,6 +2361,7 @@ lib_examples_files = Split('''
multicol.lyx
noweb2lyx.lyx
powerdot-example.lyx
recipebook.lyx
script_form.lyx
seminar.lyx
serial_letter1.lyx
@ -2606,6 +2607,7 @@ lib_layouts_files = Split('''
mwrep.layout
paper.layout
powerdot.layout
recipebook.layout
report.layout
revtex.layout
revtex4.layout

View File

@ -226,6 +226,7 @@ dist_examples_DATA = \
examples/multicol.lyx \
examples/noweb2lyx.lyx \
examples/powerdot-example.lyx \
examples/recipebook.lyx \
examples/script_form.lyx \
examples/seminar.lyx \
examples/serial_letter1.lyx \
@ -1038,6 +1039,7 @@ dist_layouts_DATA =\
layouts/numrevtex.inc \
layouts/paper.layout \
layouts/powerdot.layout \
layouts/recipebook.layout \
layouts/report.layout \
layouts/revtex.layout \
layouts/revtex4.layout \

350
lib/examples/recipebook.lyx Normal file
View File

@ -0,0 +1,350 @@
#LyX 1.6.1svn created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass recipebook
\begin_preamble
\end_preamble
\use_default_options false
\language english
\inputencoding auto
\font_roman times
\font_sans helvet
\font_typewriter courier
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 0
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 2
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language swedish
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\author ""
\author ""
\end_header
\begin_body
\begin_layout Title
Recipe book example
\end_layout
\begin_layout Author
By Sándor Szőke (alex@lyx.hu)
\end_layout
\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents
\end_inset
\end_layout
\begin_layout Chapter
Soups
\end_layout
\begin_layout Recipe
\begin_inset Quotes sld
\end_inset
Birdmilk
\begin_inset Quotes srd
\end_inset
\end_layout
\begin_layout Ingredients
\begin_inset OptArg
status open
\begin_layout Plain Layout
\begin_inset space ~
\end_inset
(for 4 persons)
\end_layout
\end_inset
2
\begin_inset space \thinspace{}
\end_inset
litres milk, 7
\begin_inset space \thinspace{}
\end_inset
pcs.
egg, 3
\begin_inset space \thinspace{}
\end_inset
packet vanilia (3×10
\begin_inset space \thinspace{}
\end_inset
g), 6
\begin_inset space \thinspace{}
\end_inset
tbl spoon sugar
\end_layout
\begin_layout Standard
Put 2
\begin_inset space \thinspace{}
\end_inset
tbl.
spoon sugar into 2
\begin_inset space \thinspace{}
\end_inset
litres milk (spare 1.5
\begin_inset space \thinspace{}
\end_inset
dl for later) and 1
\begin_inset space \thinspace{}
\end_inset
packet vanilia.
\end_layout
\begin_layout Standard
Put 2
\begin_inset space \thinspace{}
\end_inset
tbl.
spoon sugar into the 7
\begin_inset space \thinspace{}
\end_inset
eggyolk and 1
\begin_inset space \thinspace{}
\end_inset
packet vanilia.
Stir well.
Add 1.5
\begin_inset space \thinspace{}
\end_inset
dl milk to it and stir it again well.
\end_layout
\begin_layout Standard
Whisk the 7
\begin_inset space \thinspace{}
\end_inset
eggwhite, when you almost ready add 2
\begin_inset space \thinspace{}
\end_inset
tbl.
spoon sugar and 1
\begin_inset space \thinspace{}
\end_inset
packet vanilia to it.
The egg foam must be brewed in the milk (in the approx 2
\begin_inset space \thinspace{}
\end_inset
l).
\end_layout
\begin_layout Standard
Put the the eggyolk into the milk, stir a little.
Now take a tbl.
spoon and put equivalent sized pieces of the foam into the milk.
Almost ready, all the thing must be brewed alltogether.
When you are stiring do it carefully, do not brake the foam.
\end_layout
\begin_layout Standard
You can eat it when it is hot, but I prefer to cool it down.
I like when it is cold.
\end_layout
\begin_layout Chapter
Drinks
\end_layout
\begin_layout Recipe
Wineliqueur (1st variant)
\end_layout
\begin_layout Ingredients
1
\begin_inset space \thinspace{}
\end_inset
litre wine, 25
\begin_inset space \thinspace{}
\end_inset
dkg sugar, 3
\begin_inset space ~
\end_inset
packets vanilla (3×10
\begin_inset space \thinspace{}
\end_inset
g), 3-4
\begin_inset space \thinspace{}
\end_inset
dl rum and rum flavour
\end_layout
\begin_layout Standard
Stir all of the components and store for at least one week on a cold place.
\end_layout
\begin_layout Standard
Taste it and enjoy.
:)
\end_layout
\begin_layout Recipe
Wineliqueur (2nd variant)
\end_layout
\begin_layout Ingredients
1
\begin_inset space \thinspace{}
\end_inset
litre wine, 40
\begin_inset space \thinspace{}
\end_inset
dkg sugar, 1
\begin_inset space \thinspace{}
\end_inset
pc.
vanilla stick, 3-4
\begin_inset space \thinspace{}
\end_inset
dl rum and rum flavour
\end_layout
\begin_layout Standard
Stir all of the components and store for at least one week on a cold place.
\end_layout
\begin_layout Standard
Taste it and enjoy.
:)
\end_layout
\begin_layout Recipe
Wineliqueur (3rd variant)
\end_layout
\begin_layout Ingredients
2
\begin_inset space ~
\end_inset
litres wine, 50
\begin_inset space \thinspace{}
\end_inset
dkg sugar, 5
\begin_inset space \thinspace{}
\end_inset
dl water, 5
\begin_inset space \thinspace{}
\end_inset
dl sour cherry fluid (!), 1
\begin_inset space \thinspace{}
\end_inset
dl Cuba rum, 2
\begin_inset space \thinspace{}
\end_inset
packets vanilla (2×10
\begin_inset space \thinspace{}
\end_inset
g)
\end_layout
\begin_layout Standard
Stir all of the components and store for at least one week on a cold place.
\end_layout
\begin_layout Standard
Taste it and enjoy.
:)
\end_layout
\begin_layout Recipe
Home made Baily's
\end_layout
\begin_layout Ingredients
2
\begin_inset space \thinspace{}
\end_inset
dl Whisky or Rum, 3
\begin_inset space \thinspace{}
\end_inset
dl skimmings, 2
\begin_inset space \thinspace{}
\end_inset
pcs egg yolk, 40
\begin_inset space \thinspace{}
\end_inset
dkg powdered sugar (can be replaced with honey)
\end_layout
\begin_layout Standard
Stir all of the components and store for at least one week on a cold place.
\end_layout
\begin_layout Standard
Taste it and enjoy.
:)
\end_layout
\end_body
\end_document

View File

@ -0,0 +1,139 @@
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass[scrbook]{book (recipes)}
# Recipe textclass definition file.
# Author: Sandor Szoke (alex@lyx.hu)
#
# The \part, \chapter, \section and \subsection commands
# work as usual; \subsubsection commands are used for
# ``recipes'' as units, and are not numbered but (by
# default) entered in the .toc file.
#
# The recipe (a.k.a. subsubsection header) is typeset in
# a style defined with the command \rechead; the default
# is Large, horizontally centered, bold sans-serif: and
# the user can change that setting with a suitable
# \renewcommand{\rechead} .
#
# If e.g. \section and \subsection commands are not used
# in the text, the large indentation of the \subsubsection
# items in the Table of Contents may be ugly; for that case,
# we redefine \l@subsubsection .
#
# A specific command \recipe{...} is defined as an alias
# for a \subsubsection{...} followed by two rules across
# the whole page and by a vertical space.
#
# Another command, \ingred{...}, is defined to typeset a
# list of ingredients.
Format 11
Input scrclass.inc
Input numreport.inc
Sides 1
Sides 2
PageStyle Headings
# There is no abstract environment in scrbook.cls
NoStyle Abstract
# Global parameters.
SecNumDepth 2
TocDepth 3
Style Chapter
LabelString "\thechapter"
End
Style Bibliography
TopSep 4
LabelString "Bibliography"
LabelFont
Series Bold
Size Largest
EndFont
End
Preamble
\setcounter{secnumdepth}{2} % subsubsections not numbered
\setcounter{tocdepth}{3} % subsubsections in the .toc file
\newcommand{\rechead}
{\centering\normalfont\Large\sffamily\bfseries}
\renewcommand{\subsubsection}
{\@startsection{subsubsection}{3}{\z@}%
{-5ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\rechead}}
\newcommand{\recipe}[1]{\subsubsection{#1}%
\hrule height0.75pt width\hsize\vspace*{1\p@}%
\hrule height0.25pt width\hsize%
\nobreak
\vskip\parskip}
\newcommand{\inghead}[1][]{\large\textbf{Ingredients#1}:}
\newcommand{\ingred}[2][]
{{\list{}{\rightmargin 1em\leftmargin 1em}%
\item[]\textit{\inghead[#1]} #2\endlist}%
\hrule height0.25pt width\hsize}
EndPreamble
Style Recipe
LatexType Command
LatexName recipe
Margin Static
LeftMargin Ingredients_for_some:xx
LabelSep xx
LabelType Static
LabelString "Recipe:"
Align Center
LabelFont
Family Sans
Size Large
Series Bold
Shape Italic
Color red
EndFont
End
# Subsubsection style definition
Style Subsubsection
LatexType Command
LatexName subsubsection
ParSkip 0.4
TopSep 0.9
BottomSep 0.5
ParSep 0.5
Align Block
AlignPossible Block
Font
Size Small
EndFont
End
# Inghead style definition
Style Ingredients
LatexType Command
LatexName ingred
OptionalArgs 1
Margin Static
LeftMargin Ingredients_for_some:xx
LabelSep xx
Align Left
AlignPossible Left, Block
LabelType Static
LabelString "Ingredients:"
LabelFont
Series Bold
Shape Italic
Color red
EndFont
Preamble
\renewcommand*\l@subsubsection{\@dottedtocline{3}{3em}{0em}}
\setlength\parindent{0pt}
\setlength\parskip{2ex plus 0.5ex}
EndPreamble
End

View File

@ -41,6 +41,8 @@ What's new
- New layout file for submissions to ACM SIGGRAPH conferences and publications.
- New layout file to typeset recipes.
* USER INTERFACE