Debian Codegraph @

texmf-dist/doc/latex/recipebook/README

raw
1 %====Copyright info==========================================================%
2 %% README.txt
3 %% Copyright 2015 Brad Granger
4 %
5 % This work may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either version 1.3
7 % of this license or any later version.
8 % The latest version of this license is in
9 % http://www.latex-project.org/lppl.txt
10 % and version 1.3 or later is part of all distributions of LaTeX
11 % version 2005/12/01 or later.
12 %
13 % This work has the LPPL maintenance status `maintained'.
14 %
15 % The Current Maintainer of this work is Brad Granger
16 % This work consists of the file RecipeBook.cls
17 %
18 %====Abstract================================================================%
19 This is a LaTeX2e class file for typesetting recipes. It is designed for
20 typesetting one or two recipes per page, with dimensions of 5.5'' x 8.5''.
21 The hyperlinked table of contents (ToC) and page numbers make browsing
22 recipes convenient, and the pages can be joined together or printed 2 per page
23 to normal letterpaper easily. The size was chosen to work in half-page
24 3-ring binder cover sheets, because un-laminated paper just doesn't last in the
25 kitchen.
26
27 This class requires pdflatex to compile with image transparency.
28
29 The half-letter pages can be printed two per page using your printer driver, or
30 bound together using pdfjam, a shell script free and available for MacOSX and
31 Linux. I haven't tested in MacOS, but in Linux the command to bind together
32 your recipes for printing is
33 $ pdfjam --nup 2x1 --papersize '{11in,8.5in}' Recipes.pdf
34 where Recipes.pdf is the compiled version of your recipes.
35 More info on pdfjam can be found here: http://go.warwick.ac.uk/pdfjam.
36
37 %====Installation instructions===============================================%
38 The simplest method is to place RecipeBook.cls in the same directory as your
39 LaTeX source file.
40
41 To install system-wide make the folder RecipeBook in your latex
42 search path and place RecipeBook.cls inside.
43
44 On Debian / Ubuntu systems, the preferred location is:
45 /usr/local/share/texmf/tex/latex/
46 Navigate to /usr/local/share/texmf, and execute the following bash command
47 to update the search path.
48 $ sudo mktexlsr
49
50 %====Command and environment overview========================================%
51 %----Title page and table of contents----------------------------------------%
52 \titlepage[<Text>]{<image1>}{<image2>}{<image3>}
53 This command will generate the title page. The title is given by <Text> with
54 the default being Recipes, and <imagex> the image files to use.
55
56 \section{<section>}
57 Add a section heading to the ToC with a hyperlink pointing to the next recipe.
58
59 \subsection{<subsection>}
60 Add a subsection heading to the ToC with a hyperlink. This also controls
61 clearing / moving to the next page, so each recipe should be preceeded by
62 its subsection command.
63
64 %----Recipe formatting-------------------------------------------------------%
65 \title[<fontsize>]{<Text>}
66 Format the recipe title. Default <fontsize> is 22pt.
67
68 \subtitle[<fontsize>]{<Text>}
69 Format the subtitle. Default <fontsize> is 18pt.
70
71 \recipesection[<fontsize>]{<Text>}
72 Add a section heading to the recipe, e.g. before the list of ingredients.
73
74 \author[<Preamble>{<text>}
75 Adds a footnote in the SW corner with text <text> preceded by <Preamble>.
76 <Preamble> is 'Author: ' by default.
77
78 \begin{info} ... \end{info}
79 This is a tabular environment with two columns for general recipe info like
80 cooking time and recipe yield.
81
82 \begin{info*} ... \end{info*}
83 Same and info environment except more compact spacing.
84
85 \begin{ingredients}[<bullet>] ... \end{ingredients}
86 The standard environment for listing ingredients. This will not wrap pages.
87 This is a tabular environment with 2 columns. Ingredients and section
88 headers can be listed with the following commands.
89
90 \item[<bullet>]{<Text>}
91 The optional argument <bullet> specifies the list bullets, the default is
92 the \square icon.
93
94 \group{<Text>}
95 Formats a section header between ingredients.
96
97 \begin{ingredients*} ... \end{ingredients*}
98 Alternative method for formatting ingredients. This works best when the
99 recipe can be divided into parts, and ingredients listed with their
100 corresponding instructions. Formats the ingredients with a light background
101 with blurred edges. Uses the same commands for the unstarred version for
102 listing ingredients.
103
104 \step{<Number>}{<Text>}
105 Instruction steps don't need to be placed in an environment like ingredients.
106 <Number> gives the instruction number, and <Text> the instruction text.
107 <Number> should be a single digit followed by a period, or it will overflow the
108 box.
109
110 \hlgroup[<color>]{<Text>}
111 Formats <Text> in italics with a shaded background with blurred edges. Useful
112 for separating instruction steps with section information (e.g. 'For the
113 sauce').
114
115 \begin[<size>]{shrink} ... \end{shrink}
116 You can put an entire recipe within the shrink environment if it doesn't fit
117 on the page. Default value of <size> is 1pt, decimals are allowed.
118 % Grow environment
119
120 \begin[<size>]{grow} ... \end{grow}
121 The complement of the shrink environment, if you would like your text larger.
122 Default value is 1pt, decimals are allowed.
123 %----Image commands----------------------------------------------------------%
124 \pic[<location>]{<image>}
125 Add a float image with fuzzy edges to your recipe. <location> can be h for
126 here, t for top, or b for bottom. <image> is the image file, e.g. Burgers.jpg.
127
128 \leftbgpic[<length>][<opacity>]{<image>}
129 Add a background image in the left column. <length> is the vertical distance
130 from the top of the page, the default is the length \pagetop. Opacity is a
131 number between 0 and 1 with a default of 0.4. <image> is an image file.
132
133 \rightbgpic[<length>][<opacity>]{<image>}
134 Add a background image in the right column. Default <length> of \pagebottom
135 places the image at the bottom of the page.
136
137 %====Class specific lengths==================================================%
138 % The following lengths are used to control various aspects of the class.
139 \basefontsize % Info, ingredients, and instructions font size
140 \basefontskipsize % Normally about 1.2\basefontsize. Controls line spacing.
141 \recipetitlefontsize % Font size for recipe titles, not the title-page title.
142 \instrnumsize % Font size for the instruction numbers
143 \recipeheadfontsize % Font size for headings using \recipesection{}.
144
145 %====Required Latex Packages=================================================%
146 ragged2e % Left-aligns document instead of default justified, which leaves
147 % large gaps in 2-column mode.
148 amsmath,amsfonts,amssymb % Use for \square symbol, etc.
149 xparse % Allows for multiple optional arguments in new environments
150 % and other convenient class features
151 wrapfig % Used for numbering instruction steps
152 graphicx % Used to include pictures
153 eso-pic % Used for transparent images
154 anyfontsize % Provides arbitrary font sizes
155 scrextend % Used with anyfontsize
156 multirow, multicol % Join cells in tabular (used in \group)
157 nicefrac % Nicer fraction format for inline fractions
158 xcolor % Colored text
159 gensymb % Provides degree symbol with \degree.
160 booktabs % Provies a nice table line with \toprule
161 tabularx % Required for ingredients and info environments
162 calc % Provides \widthof for automatically adjusting width of
163 % the number box in \step{}
164 picture % Used for absolute page dimensions with put{}.
165 parskip % Custom spacing options
166 tgtermes % Default font package
167 fontenc % Required for controlling the font, somehow
168 datetime % Used to generate the compile date on the title page
169 fancyhdr % Used to control header and footer content
170 tikz % Used for more complicated image control like fuzzy edges.
171 tocloft % Used for more control over the table of contents (ToC).
172 hypperref % Used for hyperlinked ToC and page numbers.
173 geometry % Sets page geometry.
174 environ % Used for more advanced environment definitions
175 tcolorbox % Used for faded boxes in ingredients* environment
176
177 %====Known bugs / features===================================================%
178 Images with transparency won't work on the last page of the document. The
179 workaround is to place a \clearpage command before \end{document}
180
181 \author must be redefined for every page or it will carry over to the following
182 recipes.