Document Classesrecipecard | Enumerated Instructions

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
E1sa
Posts: 1
Joined: Thu Jan 10, 2013 5:57 am

recipecard | Enumerated Instructions

Post by E1sa »

Hi all,

I'm using the recipecard class to make some cards for my recipe box. However, I would like to make the recipe instructions a numbered list. I have tried using enumerate, however although a list is created, there are no numbers. Also, with the way I am using the class at the moment, 'Cook Time' is outside the recipe card box. I would ideally like the Cook Time and Temperature to appear in the bottom left and bottom right of the card, respectively. Google is not being very helpful, so I'd really appreciate some guidance!

Here is my MWE. I am compiling using PDFLaTeX.

Code: Select all

\documentclass[fourbysix]{recipecard}
\begin{document}
\ingredient{plums}
\ingredient{4 cups sugar}
\changeingrdlistnum{3}
\begin{recipe}{Plum Cordial}{~ one litre}
\begin{enumerate}
	\item Instruction one. 
	\item Instruction two.
\end{enumerate}
\cookingtime{20 minutes}
\cooktemp{0}

\end{recipe}
\end{document}

Thanks for your help!
Elsa.
Last edited by Stefan Kottwitz on Thu Jan 10, 2013 9:22 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

recipecard | Enumerated Instructions

Post by Stefan Kottwitz »

You can use the enumitem package to define your own enumerated list, such as:

Code: Select all

\documentclass[fourbysix]{recipecard}
\usepackage[loadonly]{enumitem}% load the package without redefining the original lists
\newlist{instructions}{enumerate}{1}% create a new enumerated list with depth 1
\setlist[instructions,1]{label=\arabic*.~}% define a label for level 1
\begin{document}
\ingredient{plums}
\ingredient{ 4 cups sugar}
\changeingrdlistnum{3}
\begin{recipe}{Plum Cordial}{~ one litre}
\begin{instructions}
        \item Instruction one. 
        \item Instruction two.
\end{instructions}
\cookingtime{20 minutes}
\cooktemp{0}

\end{recipe}
\end{document}
Stefan
LaTeX.org admin
Post Reply