Index of /archives/text/CTAN/macros/latex/contrib/recipebook
Name Last modified Size Description
Parent Directory -
LongSample.pdf 2015-04-21 04:20 639K
LongSample.tex 2015-04-21 04:20 10K
README 2015-04-21 00:45 8.1K
RecipeBook.cls 2015-04-21 00:45 13K
ShortSample.pdf 2015-04-21 04:20 223K
ShortSample.tex 2015-04-21 04:20 3.6K
images/ 2015-04-22 16:10 -
%====Copyright info==========================================================%
%% README.txt
%% Copyright 2015 Brad Granger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Brad Granger
% This work consists of the file RecipeBook.cls
%
%====Abstract================================================================%
This is a LaTeX2e class file for typesetting recipes. It is designed for
typesetting one or two recipes per page, with dimensions of 5.5'' x 8.5''.
The hyperlinked table of contents (ToC) and page numbers make browsing
recipes convenient, and the pages can be joined together or printed 2 per page
to normal letterpaper easily. The size was chosen to work in half-page
3-ring binder cover sheets, because un-laminated paper just doesn't last in the
kitchen.
This class requires pdflatex to compile with image transparency.
The half-letter pages can be printed two per page using your printer driver, or
bound together using pdfjam, a shell script free and available for MacOSX and
Linux. I haven't tested in MacOS, but in Linux the command to bind together
your recipes for printing is
$ pdfjam --nup 2x1 --papersize '{11in,8.5in}' Recipes.pdf
where Recipes.pdf is the compiled version of your recipes.
More info on pdfjam can be found here: http://go.warwick.ac.uk/pdfjam.
%====Installation instructions===============================================%
The simplest method is to place RecipeBook.cls in the same directory as your
LaTeX source file.
To install system-wide make the folder RecipeBook in your latex
search path and place RecipeBook.cls inside.
On Debian / Ubuntu systems, the preferred location is:
/usr/local/share/texmf/tex/latex/
Navigate to /usr/local/share/texmf, and execute the following bash command
to update the search path.
$ sudo mktexlsr
%====Command and environment overview========================================%
%----Title page and table of contents----------------------------------------%
\titlepage[<Text>]{<image1>}{<image2>}{<image3>}
This command will generate the title page. The title is given by <Text> with
the default being Recipes, and <imagex> the image files to use.
\section{<section>}
Add a section heading to the ToC with a hyperlink pointing to the next recipe.
\subsection{<subsection>}
Add a subsection heading to the ToC with a hyperlink. This also controls
clearing / moving to the next page, so each recipe should be preceeded by
its subsection command.
%----Recipe formatting-------------------------------------------------------%
\title[<fontsize>]{<Text>}
Format the recipe title. Default <fontsize> is 22pt.
\subtitle[<fontsize>]{<Text>}
Format the subtitle. Default <fontsize> is 18pt.
\recipesection[<fontsize>]{<Text>}
Add a section heading to the recipe, e.g. before the list of ingredients.
\author[<Preamble>{<text>}
Adds a footnote in the SW corner with text <text> preceded by <Preamble>.
<Preamble> is 'Author: ' by default.
\begin{info} ... \end{info}
This is a tabular environment with two columns for general recipe info like
cooking time and recipe yield.
\begin{info*} ... \end{info*}
Same and info environment except more compact spacing.
\begin{ingredients}[<bullet>] ... \end{ingredients}
The standard environment for listing ingredients. This will not wrap pages.
This is a tabular environment with 2 columns. Ingredients and section
headers can be listed with the following commands.
\item[<bullet>]{<Text>}
The optional argument <bullet> specifies the list bullets, the default is
the \square icon.
\group{<Text>}
Formats a section header between ingredients.
\begin{ingredients*} ... \end{ingredients*}
Alternative method for formatting ingredients. This works best when the
recipe can be divided into parts, and ingredients listed with their
corresponding instructions. Formats the ingredients with a light background
with blurred edges. Uses the same commands for the unstarred version for
listing ingredients.
\step{<Number>}{<Text>}
Instruction steps don't need to be placed in an environment like ingredients.
<Number> gives the instruction number, and <Text> the instruction text.
<Number> should be a single digit followed by a period, or it will overflow the
box.
\hlgroup[<color>]{<Text>}
Formats <Text> in italics with a shaded background with blurred edges. Useful
for separating instruction steps with section information (e.g. 'For the
sauce').
\begin[<size>]{shrink} ... \end{shrink}
You can put an entire recipe within the shrink environment if it doesn't fit
on the page. Default value of <size> is 1pt, decimals are allowed.
% Grow environment
\begin[<size>]{grow} ... \end{grow}
The complement of the shrink environment, if you would like your text larger.
Default value is 1pt, decimals are allowed.
%----Image commands----------------------------------------------------------%
\pic[<location>]{<image>}
Add a float image with fuzzy edges to your recipe. <location> can be h for
here, t for top, or b for bottom. <image> is the image file, e.g. Burgers.jpg.
\leftbgpic[<length>][<opacity>]{<image>}
Add a background image in the left column. <length> is the vertical distance
from the top of the page, the default is the length \pagetop. Opacity is a
number between 0 and 1 with a default of 0.4. <image> is an image file.
\rightbgpic[<length>][<opacity>]{<image>}
Add a background image in the right column. Default <length> of \pagebottom
places the image at the bottom of the page.
%====Class specific lengths==================================================%
% The following lengths are used to control various aspects of the class.
\basefontsize % Info, ingredients, and instructions font size
\basefontskipsize % Normally about 1.2\basefontsize. Controls line spacing.
\recipetitlefontsize % Font size for recipe titles, not the title-page title.
\instrnumsize % Font size for the instruction numbers
\recipeheadfontsize % Font size for headings using \recipesection{}.
%====Required Latex Packages=================================================%
ragged2e % Left-aligns document instead of default justified, which leaves
% large gaps in 2-column mode.
amsmath,amsfonts,amssymb % Use for \square symbol, etc.
xparse % Allows for multiple optional arguments in new environments
% and other convenient class features
wrapfig % Used for numbering instruction steps
graphicx % Used to include pictures
eso-pic % Used for transparent images
anyfontsize % Provides arbitrary font sizes
scrextend % Used with anyfontsize
multirow, multicol % Join cells in tabular (used in \group)
nicefrac % Nicer fraction format for inline fractions
xcolor % Colored text
gensymb % Provides degree symbol with \degree.
booktabs % Provies a nice table line with \toprule
tabularx % Required for ingredients and info environments
calc % Provides \widthof for automatically adjusting width of
% the number box in \step{}
picture % Used for absolute page dimensions with put{}.
parskip % Custom spacing options
tgtermes % Default font package
fontenc % Required for controlling the font, somehow
datetime % Used to generate the compile date on the title page
fancyhdr % Used to control header and footer content
tikz % Used for more complicated image control like fuzzy edges.
tocloft % Used for more control over the table of contents (ToC).
hypperref % Used for hyperlinked ToC and page numbers.
geometry % Sets page geometry.
environ % Used for more advanced environment definitions
tcolorbox % Used for faded boxes in ingredients* environment
%====Known bugs / features===================================================%
Images with transparency won't work on the last page of the document. The
workaround is to place a \clearpage command before \end{document}
\author must be redefined for every page or it will carry over to the following
recipes.