cheese/cheese.sty

112 lines
3.3 KiB
TeX

%
% Copyright 2016 (c) Anna Schumaker.
%
\usepackage{gensymb}
\usepackage[landscape, top=0.8in, bottom=0.5in, left=0.7in, right=0.7in]{geometry}
\usepackage{graphicx}
\usepackage{hhline}
\usepackage{makecell}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage[table]{xcolor}
% Create a thick line for table borders
\newcommand{\thickline}{\Xhline{2\arrayrulewidth}}
% Create a thinner line for separating steps
\renewcommand{\_} {\\ \hhline{|~*{7}{|-}|}}
% Turn a table cell gray
\newcommand{\gray}{\cellcolor{gray!30}}
% Set up a common table header style
\newcommand{\tbhead}[1]{\bfseries\centering\arraybackslash\footnotesize{#1}}
% Add a new column type for centered columns of specified width
\newcolumntype{C}{>{\centering\arraybackslash}p{0.85in}}
% ... and a new column type for thick vertical lines
\newcolumntype{'}{!{\vrule width 1pt}}
% Create a new environment that sets up everything we need to make cheese
\newenvironment{cheese}[2]
{
\thispagestyle{empty}
\noindent
\setlength{\extrarowheight}{2pt}
\begin{tabularx}{\textwidth}{ p{2.5in}lllX }
Cheese: \textbf{#1} & Flavors: \hfill & & Date: & Age Until: \\
Milk Brand: \hfill & Type: ( Whole / \hspace{4em} )
& Homogenized: (Y / N )
& Pastuerized: ( Y / N )
& Milked On: \\
\end{tabularx}
\noindent
\setlength{\tabcolsep}{3pt}
\setlength{\extrarowheight}{#2}
\tabularx{\textwidth}{ 'c'c|C|C|C|C|c|X' }
\thickline
\tbhead{} & \tbhead{Operation} & \tbhead{Amount} & \tbhead{Time}
& \tbhead{Goal Temp} & \tbhead{Actual Temp}
& \tbhead{\ pH\ } & \tbhead{Comments And Notes} \\
}
{
\thickline
\endtabularx
% FIXME: A newline was required for the \thickline to show up?
}
% Preformat some fractions
\newcommand{\half} {\(\frac{1}{2}\)}
\newcommand{\quarter}[1] {\(\frac{#1}{4}\)}
\newcommand{\eighth} {\(\frac{1}{8}\)}
% Format a Fahrenheit temperature
\newcommand{\ftemp}[1] {#1\degree F}
% Make reusable diluted messages
\newcommand{\diluted} {Diluted in \quarter{1} cup distilled water}
\newcommand{\dilutemilk} {Diluted in \quarter{1} cup cheese milk}
% Make reusable simple brine message
\newcommand{\simplebrine} {simple brine\footnote{1\half teaspoons salt in 1 cup water.}}
% Use this command to start a new section
\newcommand{\newsection}[2]
{
\thickline\multirow{#2}{*}{\rotatebox{90}{\tbhead{#1}}}
}
% Standard setup section used by most cheeses
\newcommand{\StandardCheeseSetupSection}
{
\newsection{Setup}{4}
& Prepare Milk & 2 gallons & & \gray & & & \_
& Calcium Chloride & \half teaspoon & & \gray & \gray & & (Optional) \diluted. \_
& Begin Heating & & & \gray & \gray & & \_
& Remove from Heat & \gray & & & & & \\
}
% Standard gel development section used by most cheeses
\newcommand{\StandardCheeseGelDevelSection}[4]
{
\newsection{Gel Devel}{4}
& Rennet & #1 & & #2 & & & \diluted. Stir 1 minute. \_
& Setting & #3 & & \gray & & & \_
& Onset of Flocculation & #4 & & \gray & \gray & & \_
& Clean Break & \gray & & \gray & \gray & & \\
}
% Standard curd-washing instructions
\newcommand{\Wash}[1]{Slowly add \ftemp{#1} water. Stir continuously}
% Easy way to add weights to the Pressing section
\newcommand{\AddWeight}[2]
{
& #1 & #2 & & \gray & \gray & &
}