Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/recipe-books.git
% Lian Tze LIM (liantze@gmail.com)
% 16 January 2013
%
% This layout was inspired by "100 Recipes from Japanese Cooking"
% by Hata Koichiro and Kondo Kazuki, Kodansha Books 
% (ISBN 978-4770020796)
% http://www.amazon.com/Recipes-Japanese-Cooking-Kodansha-Bilingual/dp/4770020791

\input{font/Sans+Serif}
\input{color/See2}
\input{font/LinuxLibertine}
\input{list/squares}
\input{layout/twocolumn-twoside}
\input{headfoot/FramedPageNo}
\input{toc/leftaligned}
\input{catidx/topcateg}
\input{flatidx/flatletter}
\input{pdf/hyperlinks}

\makeatletter
\providecommand{\vhrulefill}[1]{\leavevmode\leaders\hrule\@height#1\hfill \kern\z@}
\makeatother
\makeatletter
\providecommand{\fullruled}[2][1pt]{#2\vspace{-.2em}\vhrulefill{#1}}
\providecommand{\halfruled}[2][.4pt]{\headingmarker\ #2\vspace{-.5em}\rule{.5\linewidth}{#1}\vspace{-.25em}}
\makeatother

\setaftersecskip{6pt}

%%%% Text-only cover
\renewcommand{\maketitle}{%
\begin{tikzpicture}[overlay,remember picture]
\fill[\primarycolor] ([xshift=-.5in]current page.north east) rectangle (current page.south east);
\draw[\primarycolor,line width=6pt] ([xshift=-.65in]current page.north east) -- ([xshift=-.65in]current page.south east);
\end{tikzpicture}
\vspace*{.5in}\par
\textcolor{\recipecolor}{\sffamily\fontsize{56pt}{58pt}\selectfont\raggedright{\thetitle}\\[.4em]\fullruled[2pt]{}}\par
\vfill
{\huge\itshape\color{\darkhighlight}A recipe compilation by \theauthor\par}
}

%\setlength{\columnsep}{3em}
%\renewcommand{\columnseprule}{6pt}
\setcolsepandrule{3em}{6pt}
\renewcommand{\columnseprulecolor}{\color{\tertiarycolor}}

\renewcommand{\recipesize}{\Huge}
\renewcommand{\recipestyle}{\bfseries\itshape\iftoggle{print}{\checkoddpage\strictpagecheck\ifoddpage\raggedleft\else\raggedright\fi}{\raggedright}\fullruled}
\renewcommand{\headingsize}{\large}
\renewcommand{\headingstyle}{\bfseries\halfruled}

%\chapterstyle{bianchi}
%\patchcommand{\printchaptertitle}{\color{\recipecolor}}{}
\makechapterstyle{thickbianchi}{%
  \chapterstyle{default}
  \renewcommand*{\chapnamefont}{\normalfont\Large\sffamily\itshape}
  \renewcommand*{\chapnumfont}{\normalfont\huge}
  \renewcommand*{\printchaptername}{%
    \chapnamefont\centering\@chapapp}
  \renewcommand*{\printchapternum}{\chapnumfont \textit{\thechapter}}
  \renewcommand*{\chaptitlefont}{\normalfont\Huge\sffamily}
  \renewcommand*{\printchaptertitle}[1]{%
    \color{\recipecolor}\vhrulefill{1pt}\\\centering \chaptitlefont\textbf{##1}\par}
  \renewcommand*{\afterchaptertitle}{\vspace{-.5\baselineskip}\vhrulefill{1pt}\\\vskip\afterchapskip}
  \renewcommand*{\printchapternonum}{%
    \vphantom{\chapnumfont \textit{9}}\afterchapternum}}
\chapterstyle{thickbianchi}
\setlength\beforechapskip{-2em}

\renewcommand{\formatcategorypage}[1]{%
\thispagestyle{empty}
\begin{tikzpicture}[overlay,remember picture]
\fill[\primarycolor,opacity=.5] ([xshift=-.6in]current page.north east) rectangle (current page.south east);
\draw[\primarycolor,opacity=.5,line width=6pt] ([xshift=-.8in]current page.north east) -- ([xshift=-.8in]current page.south east);
\end{tikzpicture}
\vfill
{\raggedleft%
\tikz[overlay]\node[font=\fontsize{160pt}{162pt}\itshape\selectfont,opacity=.2,text=\primarycolor,yshift=20pt]{\substring{#1}{1}{1}};
\fontsize{48pt}{50pt}\headingfamily\bfseries\itshape\selectfont\color{\recipecolor}#1\hspace*{.3in}\par}
\vskip6pt
\tikz[overlay,remember picture]\draw[line width=6pt,\primarycolor] (0,0 -| current page.east) -- (0,0 -| current page.west);
}

\renewcommand{\ovenstyle}{\itshape\par}

\renewcommand{\ingredientsstyle}{%
  nosep,%
  label=\itemmarker,%
  leftmargin=*
}

\renewcommand{\substitutionstyle}{%
  nosep,%
  label=\itemmarker,%
  leftmargin=*
}

\renewcommand{\preparationstyle}{%
  nosep,%
  label=\itemmarker,%
  leftmargin=*
}

\renewcommand{\equipmentstyle}{%
  mode=unboxed,%
  leftmargin=*,%
  itemjoin=\inlinelistmarker,
  nosep
}

\renewcommand{\instructionsstyle}{%
  leftmargin=*,%
  itemsep=1pt,%
  label={\enumeratemarker{\arabic*}},%
  after*={\vspace{-\topsep}}
}

\normalinstructions
\normalingredients
\normalpreparation
\normalequipment

\makeatletter
\renewcommand{\insetphoto}[2][]{%
   \parsephotocitation{#1}
   \includegraphics[width=\@photowidth]{#2}\par\vspace{\afterinsetphotoskip}
}
\makeatother