cheese: Add a macro with the standard "setup" section
These rows are duplicated across just about all of my cheeses, so let's use a standard definition that only needs to be modified in a single place. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
8164ae505b
commit
49b006e1a6
14
cheddar.tex
14
cheddar.tex
|
@ -5,30 +5,18 @@
|
|||
|
||||
\usepackage{cheese}
|
||||
\usepackage{gensymb}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{hhline}
|
||||
\usepackage{multirow}
|
||||
\usepackage[document]{ragged2e}
|
||||
\usepackage[table]{xcolor}
|
||||
|
||||
% Create new table commands
|
||||
\newcommand{\chline} { \hhline{|~*{7}{|-}|} }
|
||||
\newcommand{\gray} { \cellcolor{gray!30} }
|
||||
\newcommand{\newsection}[2] { \thickline\multirow{#2}{*}{\rotatebox{90}{\tbhead{#1}}} }
|
||||
|
||||
% Let's make some shortcuts!
|
||||
\newcommand{\tempF}[1] {#1\degree F}
|
||||
\newcommand{\half} {\(\frac{1}{2}\) }
|
||||
\newcommand{\quarter} {\(\frac{1}{4}\) }
|
||||
|
||||
\begin{document}
|
||||
\begin{cheese}{Cheddar}
|
||||
|
||||
\newsection{Setup}{4}
|
||||
& Prepare Milk & 2 gallons & & \gray & & & \\ \chline
|
||||
& Calcium Chloride & \half teaspoon & & \gray & & & (Optional) Diluted in \quarter cup distilled water. \\ \chline
|
||||
& Begin Heating & & & \gray & \gray & & \\ \chline
|
||||
& Remove from Heat & \gray & & & & & \\
|
||||
\StandardCheeseSetupSection
|
||||
|
||||
\newsection{Acid}{2}
|
||||
& Mesophilic Starter & 1 packet & & \tempF{81} & & & 1 packet = \quarter teaspoon. \\ \chline
|
||||
|
|
33
cheese.sty
33
cheese.sty
|
@ -3,12 +3,22 @@
|
|||
%
|
||||
|
||||
\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}}
|
||||
|
||||
|
@ -48,3 +58,26 @@
|
|||
|
||||
% FIXME: A newline was required for the \thickline to show up?
|
||||
}
|
||||
|
||||
% Preformat some fractions
|
||||
\newcommand{\half} {\(\frac{1}{2}\) }
|
||||
\newcommand{\quarter} {\(\frac{1}{4}\) }
|
||||
|
||||
% Make a reusable diluted message
|
||||
\newcommand{\diluted} { Diluted in \quarter cup distilled 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 & & & & & \\
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue