cheese: Add standard table headings to the cheese environment
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
3e88583b04
commit
8164ae505b
17
cheddar.tex
17
cheddar.tex
|
@ -7,20 +7,14 @@
|
||||||
\usepackage{gensymb}
|
\usepackage{gensymb}
|
||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
\usepackage{hhline}
|
\usepackage{hhline}
|
||||||
\usepackage{makecell}
|
|
||||||
\usepackage{multirow}
|
\usepackage{multirow}
|
||||||
\usepackage[document]{ragged2e}
|
\usepackage[document]{ragged2e}
|
||||||
\usepackage[table]{xcolor}
|
\usepackage[table]{xcolor}
|
||||||
|
|
||||||
% Create new table commands
|
% Create new table commands
|
||||||
\newcommand{\thickhline} { \Xhline{2\arrayrulewidth} }
|
|
||||||
\newcommand{\chline} { \hhline{|~*{7}{|-}|} }
|
\newcommand{\chline} { \hhline{|~*{7}{|-}|} }
|
||||||
\newcommand{\gray} { \cellcolor{gray!30} }
|
\newcommand{\gray} { \cellcolor{gray!30} }
|
||||||
\newcommand{\tbhead}[1] { \bfseries\centering\arraybackslash\footnotesize{#1} }
|
\newcommand{\newsection}[2] { \thickline\multirow{#2}{*}{\rotatebox{90}{\tbhead{#1}}} }
|
||||||
\newcommand{\newsection}[2] { \thickhline\multirow{#2}{*}{\rotatebox{90}{\tbhead{#1}}} }
|
|
||||||
|
|
||||||
% Add a new column for centered columns of specified width
|
|
||||||
\newcolumntype{C}{>{\centering\arraybackslash}p{0.85in}}
|
|
||||||
|
|
||||||
% Let's make some shortcuts!
|
% Let's make some shortcuts!
|
||||||
\newcommand{\tempF}[1] {#1\degree F}
|
\newcommand{\tempF}[1] {#1\degree F}
|
||||||
|
@ -29,13 +23,6 @@
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
\begin{cheese}{Cheddar}
|
\begin{cheese}{Cheddar}
|
||||||
\noindent
|
|
||||||
\setlength{\tabcolsep}{3pt}
|
|
||||||
\setlength{\extrarowheight}{4pt}
|
|
||||||
\begin{tabularx}{\textwidth}{ !{\vrule width 1pt} c !{\vrule width 1pt} c | C | C | C | C | c | X !{\vrule width 1pt} }
|
|
||||||
|
|
||||||
\thickhline
|
|
||||||
\tbhead{} & \tbhead{Operation} & \tbhead{Amount} & \tbhead{Time} & \tbhead{Goal Temp} & \tbhead{Actual Temp} & \tbhead{Ph} & \tbhead{Comments And Notes} \\
|
|
||||||
|
|
||||||
\newsection{Setup}{4}
|
\newsection{Setup}{4}
|
||||||
& Prepare Milk & 2 gallons & & \gray & & & \\ \chline
|
& Prepare Milk & 2 gallons & & \gray & & & \\ \chline
|
||||||
|
@ -80,7 +67,5 @@
|
||||||
& Waxing & \gray & & \gray & \gray & & \\ \chline
|
& Waxing & \gray & & \gray & \gray & & \\ \chline
|
||||||
& Aging & 3 - 12 months & & \tempF{50} - \tempF{55} & \gray & & \\
|
& Aging & 3 - 12 months & & \tempF{50} - \tempF{55} & \gray & & \\
|
||||||
|
|
||||||
\thickhline
|
|
||||||
\end{tabularx}
|
|
||||||
\end{cheese}
|
\end{cheese}
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
26
cheese.sty
26
cheese.sty
|
@ -3,8 +3,21 @@
|
||||||
%
|
%
|
||||||
|
|
||||||
\usepackage[landscape, top=0.8in, bottom=0.5in, left=0.7in, right=0.7in]{geometry}
|
\usepackage[landscape, top=0.8in, bottom=0.5in, left=0.7in, right=0.7in]{geometry}
|
||||||
|
\usepackage{makecell}
|
||||||
\usepackage{tabularx}
|
\usepackage{tabularx}
|
||||||
|
|
||||||
|
% Create a thick line for table borders
|
||||||
|
\newcommand{\thickline}{\Xhline{2\arrayrulewidth}}
|
||||||
|
|
||||||
|
% 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
|
% Create a new environment that sets up everything we need to make cheese
|
||||||
\newenvironment{cheese}[1]
|
\newenvironment{cheese}[1]
|
||||||
{
|
{
|
||||||
|
@ -19,6 +32,19 @@
|
||||||
& Pastuerized: ( Y / N )
|
& Pastuerized: ( Y / N )
|
||||||
& Other: \\
|
& Other: \\
|
||||||
\end{tabularx}
|
\end{tabularx}
|
||||||
|
|
||||||
|
\noindent
|
||||||
|
\setlength{\tabcolsep}{3pt}
|
||||||
|
\setlength{\extrarowheight}{4pt}
|
||||||
|
\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?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue