add drink formatting
This commit is contained in:
52
main.tex
52
main.tex
@@ -30,11 +30,11 @@
|
||||
{oz} {ounce}[ounces]
|
||||
}
|
||||
\cusetup{use-phrases=true}
|
||||
\cusetoptionfor{g}{round-precision=0} % rounds grams to whole numbers, I don't care *that* much
|
||||
|
||||
% Removing the numbers from the sections & sub-sections
|
||||
\setcounter{secnumdepth}{0}
|
||||
|
||||
|
||||
\newcounter{stepnum}
|
||||
|
||||
\makeatletter
|
||||
@@ -111,6 +111,7 @@
|
||||
\IfNoValueF{#1}{\begin{center}\testoneline{#1}\end{center}}
|
||||
\IfNoValueF{#3}{\noindent\emph{#3}\par\medskip}
|
||||
}
|
||||
|
||||
\newcommand{\serves}[2][Serves]{%
|
||||
\chead{#1 #2}}
|
||||
\newcommand{\dishtype}[1]{%
|
||||
@@ -183,6 +184,55 @@
|
||||
\pagestyle{plain}
|
||||
\setlength{\intextsep}{0pt}
|
||||
|
||||
% Different layout for Drinks that adds an hline at the end of a recipe, no serving amounts, no prep/cook time, no letters in the corner
|
||||
%% #1 [optional headnote]; #2 Title of recipe; #3 [Initial instructions]
|
||||
\NewDocumentCommand{\drink}{o m o}{%
|
||||
\setcounter{stepnum}{0}%
|
||||
\thispagestyle{fancy}
|
||||
\lhead{}%
|
||||
\chead{}%
|
||||
\rhead{}%
|
||||
\lfoot{}%
|
||||
\rfoot{}%
|
||||
\subsection{#2}%
|
||||
\IfNoValueF{#1}{\begin{center}\testoneline{#1}\end{center}}
|
||||
\IfNoValueF{#3}{\noindent\emph{#3}\par\medskip}
|
||||
}
|
||||
|
||||
\NewDocumentCommand{\drinkspace}{}{%
|
||||
\par
|
||||
\bigskip
|
||||
\filbreak
|
||||
\hrulefill
|
||||
\smallskip
|
||||
}
|
||||
|
||||
\NewDocumentEnvironment{drstep}{}{%
|
||||
\parindent0pt
|
||||
\leftskip0pt
|
||||
\begin{minipage}{\textwidth}
|
||||
\begin{wrapfigure}{r}{0pt}
|
||||
\kern-0.5em
|
||||
\vrule width 1pt\enskip
|
||||
\begin{minipage}{0.5\textwidth}
|
||||
\leftskip=1.5em
|
||||
\parindent=-1.5em
|
||||
\parskip=0.25em
|
||||
\obeylines
|
||||
}{%
|
||||
\wrapfill
|
||||
\end{minipage}
|
||||
\medskip
|
||||
}
|
||||
|
||||
\NewDocumentCommand{\drmethod}{}{%
|
||||
\end{minipage}
|
||||
\end{wrapfigure}
|
||||
\rightskip0pt plus 2em
|
||||
\parskip0.25em
|
||||
\everypar={\llap{\stepcounter{stepnum}\hbox to 1.5em{\thestepnum.\hfill}}}
|
||||
}
|
||||
|
||||
|
||||
\begin{document}
|
||||
\fontfamily{lmss}\selectfont
|
||||
|
Reference in New Issue
Block a user