| 1 |
% Filename: ShortSample.tex |
| 2 |
% Minimal sample cookbook using RecipeBook class. Demonstrates |
| 3 |
% syntax for creating a title page, hyperlinked table of |
| 4 |
% contents, and several recipe formats. |
| 5 |
|
| 6 |
\documentclass{RecipeBook} |
| 7 |
|
| 8 |
\begin{document} |
| 9 |
|
| 10 |
% \titlepage[<Text>]{<image1>}{<image2>}{<image3>} |
| 11 |
% Provide title text and three image files to \titlepage to |
| 12 |
% generate a title page. In the following the images are located |
| 13 |
% in the subdirectory images. |
| 14 |
\titlepage[Sample Title] |
| 15 |
{images/sample_image.jpg} |
| 16 |
{images/sample_image.jpg} |
| 17 |
{images/sample_image.jpg} |
| 18 |
|
| 19 |
% \makecontents |
| 20 |
% Generate hyperlinked table of contents |
| 21 |
\makecontents |
| 22 |
|
| 23 |
% Section and subsection commands for making ToC entries and |
| 24 |
% managing pagebreaks. |
| 25 |
\section{Sample section num. 1} |
| 26 |
\subsection{Sample recipe num. 1} |
| 27 |
|
| 28 |
% \author{<name>} |
| 29 |
% Author, to be displayed in a footnote |
| 30 |
\author{Sample Author} |
| 31 |
|
| 32 |
% Recipe title and subtitle |
| 33 |
\title{Sample Title} |
| 34 |
\subtitle{\hspace*{0.5in}sample subtitle} |
| 35 |
|
| 36 |
% info environment. This is a tabular environment with two |
| 37 |
% columns, so entries on the same line are separated by & and |
| 38 |
% lines must be ended with \\. |
| 39 |
\begin{info} |
| 40 |
Makes: & X servings \\ |
| 41 |
Cooking time: & X hours |
| 42 |
\end{info} |
| 43 |
|
| 44 |
% \begin[<size>]{shrink} ... \end{shrink} |
| 45 |
% Shrink the text within this environment by value <size>. Default |
| 46 |
% value is 1 pt, a good place to start if your recipe is too long. |
| 47 |
\begin{shrink} |
| 48 |
|
| 49 |
% \recipesection{<text>} |
| 50 |
% Formats a heading with text <text>. |
| 51 |
\recipesection{Ingredients} |
| 52 |
|
| 53 |
% \begin{ingredients} ... \end{ingredients} |
| 54 |
% \ingr[<bullet>]{<text>} |
| 55 |
% Format ingredients in a tabular environment with bullet points |
| 56 |
% specified by <bullet>. The default is \square. |
| 57 |
% \group{<text>} removes bullet point and underlines the text. |
| 58 |
|
| 59 |
\begin{ingredients} |
| 60 |
\group{Sample group heading} |
| 61 |
\item{Sample ingredient} |
| 62 |
\group{Sample group heading 2} |
| 63 |
\item{Sample ingredient 2} |
| 64 |
\end{ingredients} |
| 65 |
|
| 66 |
\recipesection{Instructions} |
| 67 |
|
| 68 |
% \instr{<step_number>}{<text>} |
| 69 |
% Used for numbered instructions. |
| 70 |
\step{1.}{ |
| 71 |
Sample instruction with some extra text text text text text |
| 72 |
text text text text text text text. |
| 73 |
} |
| 74 |
|
| 75 |
% \hlgroup{<text>} |
| 76 |
% Used for heading within instruction set. |
| 77 |
\hlgroup{Sample group heading} |
| 78 |
\step{2.}{ |
| 79 |
Sample instruction with some extra text text text text text |
| 80 |
text text text text text text text. |
| 81 |
} |
| 82 |
|
| 83 |
\pagebreak |
| 84 |
\pic[t]{images/sample_image.jpg} |
| 85 |
|
| 86 |
\end{shrink} |
| 87 |
|
| 88 |
\section{Sample side-by-side recipes} |
| 89 |
\subsection{Sample recipe (a)} |
| 90 |
\subsection{Sample recipe (b)} |
| 91 |
\author{Sample Author} |
| 92 |
|
| 93 |
% \leftbgpic[<offset>][<transparency>]{<image_file>} |
| 94 |
% Places a transparent image with edge fading in the left |
| 95 |
% column, with <offset> setting the vertical distance from |
| 96 |
% the top of the page (default is \pagetop). |
| 97 |
% \rightbgpic[<offset>][<transparency>]{<image>} |
| 98 |
% Same syntax for \rightbgpic and leftbgpic. Default value |
| 99 |
% for <offset> is \pagebottom. |
| 100 |
\rightbgpic{images/sample_image.jpg} |
| 101 |
\leftbgpic{images/sample_image.jpg} |
| 102 |
|
| 103 |
%----Title and info----------------------------------------------------------% |
| 104 |
\title{Sample recipe (a)} |
| 105 |
|
| 106 |
\begin{info} |
| 107 |
Makes: & X servings \\ |
| 108 |
Cooking time: & X hours |
| 109 |
\end{info} |
| 110 |
|
| 111 |
\recipesection{Ingredients} |
| 112 |
\begin{ingredients} |
| 113 |
\item{Sample ingredient} |
| 114 |
\item{Sample ingredient} |
| 115 |
\end{ingredients} |
| 116 |
|
| 117 |
\recipesection{Instructions} |
| 118 |
|
| 119 |
\step{1.}{ |
| 120 |
Sample instruction with some extra text text text text text |
| 121 |
text text text text text text text. |
| 122 |
} |
| 123 |
|
| 124 |
\pagebreak |
| 125 |
|
| 126 |
\title{Sample recipe (b)} |
| 127 |
|
| 128 |
\begin{info} |
| 129 |
Makes: & X servings \\ |
| 130 |
Cooking time: & X hours |
| 131 |
\end{info} |
| 132 |
|
| 133 |
\recipesection{Ingredients} |
| 134 |
\begin{ingredients} |
| 135 |
\item{Sample ingredient} |
| 136 |
\end{ingredients} |
| 137 |
|
| 138 |
\recipesection{Instructions} |
| 139 |
|
| 140 |
\step{1.}{ |
| 141 |
Sample instruction with some extra text text text text text |
| 142 |
text text text text text text text. |
| 143 |
} |
| 144 |
|
| 145 |
\clearpage |
| 146 |
|
| 147 |
\end{document} |
| 148 |
|