add booklet version, some formatting

This commit is contained in:
David Daily 2024-08-15 20:05:27 -05:00
parent e540250aec
commit 88ce8bbdf9
7 changed files with 43 additions and 15 deletions

View File

@ -17,17 +17,14 @@
pdfborder={0 0 1}, pdfborder={0 0 1},
backref=section, backref=section,
colorlinks=false colorlinks=false
]{hyperref} % PDF meta-information specification ]{hyperref}
% https://tex.stackexchange.com/questions/366229/an-aesthetically-pleasing-recipe-book-template
% have to define a cup cause the cooking-units writer is german and doesn't understand the flawed american way to measure ingredients. % have to define a cup cause the cooking-units writer is german and doesn't understand the flawed american way to measure ingredients.
\declarecookingunit{cup} \declarecookingunit{cup}
\cudefinename {English} \cudefinename {English}
{ {
{cup} {cup}[cups] {cup} {cup}[cups]
{oz} {ounce}[ounces] {oz} {ounce}[ounces] % lol, the plural isn't right
} }
\cusetup{use-phrases=true} \cusetup{use-phrases=true}
\cusetoptionfor{g}{round-precision=0} % rounds grams to whole numbers, I don't care *that* much \cusetoptionfor{g}{round-precision=0} % rounds grams to whole numbers, I don't care *that* much
@ -74,14 +71,26 @@
\fi \fi
} }
\newif\if@mainmatter \@mainmattertrue \title{Daily Recipes}
\author{David Daily}
\date{\small{last updated \today}}
%% Borrowed from book.cls %% Borrowed from book.cls
\newif\if@mainmatter \@mainmattertrue
\newcommand\frontmatter{% \newcommand\frontmatter{%
\cleardoublepage \cleardoublepage
\@mainmatterfalse \@mainmatterfalse
\pagenumbering{roman} \pagenumbering{roman}
\tableofcontents} \tableofcontents
\section*{Legend}
Vegetarian: \vegetarian \\
Gluten Free: \glutenfree \\
Freeze: \freeze \\
Dessert: \dessert \\
Make Ahead: \makeahead
}
\newcommand\mainmatter{% \newcommand\mainmatter{%
\cleardoublepage \cleardoublepage
\@mainmattertrue \@mainmattertrue
@ -133,8 +142,9 @@
{\large\color{dessertcolor}\textbf{D}}% {\large\color{dessertcolor}\textbf{D}}%
} }
\newcommand{\makeahead}{% \newcommand{\makeahead}{%
{\large\color{makeaheadcolor}\textbf{M}}% {\large\color{makeaheadcolor}\textbf{MA}}%
} }
%% Optional arguments for alternate names for these: %% Optional arguments for alternate names for these:
\newcommand{\preptime}[2][Prep time]{% \newcommand{\preptime}[2][Prep time]{%
\lfoot{#1: #2}% \lfoot{#1: #2}%
@ -194,6 +204,7 @@
\rhead{}% \rhead{}%
\lfoot{}% \lfoot{}%
\rfoot{}% \rfoot{}%
\renewcommand{\headrulewidth}{0pt}
\subsection{#2}% \subsection{#2}%
\IfNoValueF{#1}{\begin{center}\testoneline{#1}\end{center}} \IfNoValueF{#1}{\begin{center}\testoneline{#1}\end{center}}
\IfNoValueF{#3}{\noindent\emph{#3}\par\medskip} \IfNoValueF{#3}{\noindent\emph{#3}\par\medskip}
@ -236,6 +247,9 @@
\begin{document} \begin{document}
\fontfamily{lmss}\selectfont \fontfamily{lmss}\selectfont
\pagenumbering{gobble}
\maketitle
\frontmatter \frontmatter
\mainmatter \mainmatter

View File

@ -1,11 +1,16 @@
\section{Appetizers}\newpage % optionally: replace \section with \part to add a level between (\chapter doesn't exist in the Article class)
\section{Appetizers}
\input{recipes/TexasCaviar.tex} \input{recipes/TexasCaviar.tex}
\input{recipes/ChickenSliders.tex} \input{recipes/ChickenSliders.tex}
\newpage\section{Desserts} % ¯\_(ツ)_/¯ won't do it automagically, whatever \newpage
\section{Desserts} % ¯\_(ツ)_/¯ won't do it automagically, whatever
\input{recipes/FudgyBrownies42.tex} \input{recipes/FudgyBrownies42.tex}
%\input{recipes/DatePinwheels.tex}
\section{Drinks}\newpage % This one's cause I don't have each drink recipe making its own page \newpage
\section{Drinks}
\newpage % This one's cause I don't have each drink recipe making its own page
\input{recipes/drinks/BerrySmoothies.tex}\drinkspace \input{recipes/drinks/BerrySmoothies.tex}\drinkspace
\input{recipes/drinks/MoscowMule.tex}\drinkspace \input{recipes/drinks/MoscowMule.tex}\drinkspace
\input{recipes/drinks/TomCollins.tex} % last one doesn't need it, can't think of a better or easier way to do it so ¯\_(ツ)_ \input{recipes/drinks/TomCollins.tex} % last one doesn't need it, can't think of a better or easier way to do it so ¯\_(ツ)_

View File

@ -0,0 +1,7 @@
\recipe[From great-grandma Vera Daily]{Date Pinwheels}[]
\serves{6-8}
\preptime{1 hour}
\cooktime{1 hour}
\dishtype{\dessert}
\dishother{\freeze}

View File

@ -13,7 +13,7 @@
\end{step} \end{step}
\begin{step} \begin{step}
\cutext{3.5}{oz} / \cunum[oz=g]{3.5}{oz} Semisweet chocolate, chopped (chocolate chips work too) \cunum{3.5}{oz} / \cunum[oz=g]{3.5}{oz} Semisweet chocolate, chopped (chocolate chips work too)
1 stick/\cutext{4}{EL} unsalted butter, cut into pieces 1 stick/\cutext{4}{EL} unsalted butter, cut into pieces
\cutext{1}{EL} unsweetened cocoa powder \cutext{1}{EL} unsweetened cocoa powder
\method \method

View File

@ -5,7 +5,7 @@
\dishtype{\dessert} % options: dessert, vegetarian, glutenfree, freeze, makeahead \dishtype{\dessert} % options: dessert, vegetarian, glutenfree, freeze, makeahead
\dishother{\glutenfree} % if you need more than one of the dish types? puts it in the other corner \dishother{\glutenfree} % if you need more than one of the dish types? puts it in the other corner
\begin{step} % This used to be auto-formatted, but I removed that and am using the cooking-units package instead \begin{step}
Batter the dry: Batter the dry:
\cutext{1}{cup} AP (or GF) flour \cutext{1}{cup} AP (or GF) flour
\cutext{0.5}{cup} almond flour \cutext{0.5}{cup} almond flour

View File

@ -1,4 +1,4 @@
\drink[Alissa's favourite drink]{Moscow Mule} \drink[Alissa's favourite]{Moscow Mule}
\begin{drstep} \begin{drstep}
Cracked ice Cracked ice

View File

@ -8,5 +8,7 @@ cd "$(dirname "$0")"
pdflatex -file-line-error -interaction nonstopmode -draftmode -shell-escape -jobname=Recipes main.tex pdflatex -file-line-error -interaction nonstopmode -draftmode -shell-escape -jobname=Recipes main.tex
pdflatex -file-line-error -interaction nonstopmode -shell-escape -jobname=Recipes main.tex pdflatex -file-line-error -interaction nonstopmode -shell-escape -jobname=Recipes main.tex
pdfbook2 Recipes.pdf
rm *.aux *.out *.log *.toc rm *.aux *.out *.log *.toc
mv Recipes.pdf /home/david/fileshare/LaTeX/ mv Recipes.pdf /home/david/fileshare/LaTeX/Recipes
mv Recipes-book.pdf /home/david/fileshare/LaTeX/Recipes/Recipes-booklet.pdf