\documentclass[twoside, 9pt, openany]{extbook}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage[utf8]{inputenc}
\usepackage{extsizes}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[]{kpfonts}
\usepackage{float}
\usepackage{gensymb} % Just for the degree symbol
\usepackage{lettrine} % Drop caps
\usepackage{multicol} % Include two- or three-column sections
\usepackage{microtype} % Make things neater
\usepackage{enumitem} % Control spacing in lists
\usepackage{nicefrac} % Use nice fractions
\usepackage{setspace} % Better control over line-spacing
\usepackage{environ} % Create custom environments to make everything easy
\usepackage{quoting} % Intros to recipes
\usepackage[]{josefin} % Use 'Josephine' for sans-serif fonts
%\usepackage{venturis} % Use 'Venturis' for sans-serif fonts; font code is 'yvl'
\usepackage{xfrac}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\raggedbottom % Don't force text to fill page
\graphicspath{{images/}} % Where are our images?
\raggedright % Don't justify lines
\renewcommand*\contentsname{List of Recipes}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Page Set-up %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{geometry}

\geometry{
	paperheight=8.5in,
	paperwidth=5.5in,
	margin=0.5in
}

% Adjust the top and bottom margins
\addtolength{\topmargin}{0.4in}
\addtolength{\textheight}{-0.75in}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set up our headers and footers %%%%%%%%%%%%%%%%%%%%%%%

\usepackage{fancyhdr}

\pagestyle{fancy}
 \fancyhf{}
 \fancyhead[LE,RO]{\textit{Dude With a Fork}}
 \fancyhead[RE,LO]{Issue \#001}
 \cfoot{Page \thepage}
\renewcommand{\footrulewidth}{0.5pt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Our custom environments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{environ}

\NewEnviron{intro}
	{
		\noindent{}
		\begin{quoting}[leftmargin=10mm, rightmargin=10mm]
		\begin{small}
			\BODY
		\end{small}
		\end{quoting}
	}

\NewEnviron{ingredients}
	{
		\hrule
		\vspace{4mm}
		Ingredients:
		\noindent{}
		\begin{multicols}{2}
		\sffamily
		\begin{itemize}[nosep, left=0pt]
			\BODY 
		\end{itemize}
		\rmfamily
		\end{multicols}
	}

\NewEnviron{instructions}
	{
		\hrule
		\vspace{4mm}
		Instructions:
		\begin{enumerate}[itemsep=0mm]
			\BODY 
		\end{enumerate}
	}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Adjust spacing before chapter titles %%%%%%%%%%%%%%%%%

\usepackage{titlesec}

\titleformat{\chapter}[display]
    {\normalfont\huge\centering}
    {}
    {0pt}
	{\fontsize{24}{28}\selectfont\textsc}
\titlespacing*{\chapter}{0pt}{-20mm}{4mm}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Adjust TOC contents %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{titletoc} 

\titlecontents{chapter}[0em]{\lsstyle\smallskip}
	{}
	{}
	{\hfill}[\medskip]%

\dottedcontents{chapter}[0em]{\vspace{2mm}}{3em}{0.5pc} % dotted lines in chapters


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Adjust our xfracs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareInstance{xfrac}{JosefinSans-LF}{text}{
	slash-symbol-font = JosefinSans-LF,
	numerator-font = JosefinSans-LF,
	denominator-font = JosefinSans-LF,
	scale-factor = 1.2,
	h-scale = 1.2,
	numerator-bot-sep = 2 pt,
	denominator-bot-sep = -1 pt
	}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Document Information %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\author{Kenneth John Odle}
\title{
 {\Huge Dude With a Fork} \\
 {\footnotesize Cookbook \#1}
}
\date{\begin{small}\today{}\end{small}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Let's get it started in here %%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}
\maketitle

\pagestyle{plain}

\section*{Impressum}
All contents  \copyright2024 Kenneth John Odle

\newgeometry{left=2cm,right=2cm}
\tableofcontents
\restoregeometry

%\makeatletter
%\sffamily the family name is \f@family 
%\makeatother

\chapter{Really Cool Recipe}

\begin{center}
\includegraphics[scale=0.15]{food_001}
\end{center}

\begin{intro}
This is the intro. This is just a delightful little recipe that your entire family will enjoy.
\end{intro}

\begin{ingredients}
\item 1 cup water
\item 4 \sfrac{1}{2} cup flour
\item 1 cup water
\item 2 \sfrac{1}{2} cup flour
\item 1 cup water
\item \nicefrac{1}{2} cup flour
\item 1 cup water
\item $\frac{1}{2}$ cup flour
\end{ingredients}

\begin{instructions}
\item Do this first
\item Set oven to 175\textdegree{}C/350\textdegree{}F.
\item Then do this.
\item Finally, do this. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again.
\end{instructions}


\chapter{Another Really Cool Recipe}

\begin{center}
\includegraphics[scale=0.15]{food_001}
\end{center}

\begin{intro}
This is the intro. This is just a delightful little recipe that your entire family will enjoy. You will make this so many times that you will soon have the recipe memorized.
\end{intro}

\begin{ingredients}
\item 1 cup water
\item \nicefrac{1}{2} cup flour
\item 1 cup water
\item \nicefrac{1}{2} cup flour
\item 1 cup water
\item \nicefrac{1}{2} cup flour
\item 1 cup water
\item \nicefrac{1}{2} cup flour
\end{ingredients}

\begin{instructions}
\item Do this first
\item Set oven to 175\textdegree{}C/350\textdegree{}F.
\item Then do this.
\item Finally, do this. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again. And then do it over and over and over again.
\end{instructions}



\end{document}
