6

I'm trying to get in the habit of planning out my meals more, and was looking for a template I could use to do so in LaTeX, but I couldn't find anything.

What I did find was an already-created pdf that looked like: enter image description here

Which worked alright, but made me wish that there was something like this I could customize (for one, this list seems to be from the UK).

After looking around a little with some easier problems (turning bullet points into boxes), I was able to create the following image (I'll post my code at the bottom): enter image description here

So far this seems to work alright, but two main problems I'm running into are: (1) getting the underline closer to the bottom of the box and (2) instead of just one column of lines where I can write in ingredients, it'd be nice to have two or three columns, since I generally found it was simpler to just write in what you needed, rather than hope it's on a pre-written list.

On top of all of those issues, if anyone has any input on how to make the list more user-friendly or more appealing, I'd love to hear it. Right now mine seems a little bland! As for my code... (I'm toying around with this project in a template that I use for other work that I do, so I know I'm using a variety of packages that I don't really need!)


\documentclass[12pt]{article}
\usepackage{amsmath, amsfonts, amssymb, array}
\usepackage{graphicx, fancyhdr, color}
\usepackage[bottom=1in, top=1in, left=.5in, right=.5in]{geometry}
\usepackage{paralist}
\usepackage{tabto}

\renewcommand{\familydefault}{\sfdefault}

\pagestyle{fancy}
\fancypagestyle{firststyle} % This ensures that the header is only on page one
{
\fancyhead{}
\fancyhead[L]{{\large Week of:\underline{\hspace{5cm}} \hspace{1cm} \textbf{B:} \hspace{1.5cm} \textbf{L:} \hspace{1.5cm} \textbf{D:} \hspace{1.5cm} \fbox{Cost: \hspace{2cm}}}}}
\renewcommand{\headrulewidth}{0pt} % Removes the horizontal bar across the header
\fancyfoot{}
\fancyfoot[C]{\thepage \\ \small{rev: \today}}

\newcommand\mydiv[2]{%
$\strut#1$\kern.25em\smash{\raise.3ex\hbox{$\big)$}}$\mkern-8mu
 \overline{\enspace\strut#2}$}

\newenvironment{tabbedenum}[1]
 {\NumTabs{#1}\inparaenum\let\latexitem\item
  \def\item{\def\item{\tab\latexitem}\latexitem}}
 {\endinparaenum}

\setlength{\parindent}{0mm}

\begin{document}
\thispagestyle{firststyle}

\setlength{\fboxrule}{1.5pt}

\framebox[2.5in][l]{ \parbox[t][1.5in]{1in}{} }
\framebox[2.5in][l]{ \parbox[t][1.5in]{1in}{
\begin{itemize} \itemsep-20pt
 \renewcommand{\labelitemi}{$\Box$} 
 \item  \underline{\hspace{2cm}} \\
 \item  \underline{\hspace{2cm}} \\
 \item  \underline{\hspace{2cm}} 
\end{itemize}

} }



\end{document}
  • 1
    Untested, but consider using \rule[<depth>]{<width>}{<height>}; say, \rule[0.2cm]{2cm}{0.01cm} --- which I'd wrap into a \newcommand for easier customizability. The package multicol is useful for multicolumn stuff.... – jon Aug 14 '14 at 5:49
  • 1
    Note that the underlines are low because there is not enough space in the parbox for them to fit, so they are put on a new line. Try increasing the width of the second parbox (which is 1in in your code, 2in should be enough). – TonioElGringo Aug 14 '14 at 7:58
  • 1
    To have multiple columns, you can also put several parbox in the framebox (which should be larger for them to fit), each containing a list. The multicol package could also be used, but it might interfere with the framebox and the itemize. – TonioElGringo Aug 14 '14 at 9:10
3

Your primary problem was that your \parbox was wrapping, because you only made it 1 inch wide, but were placing the \Box plus a 2cm underline on it. Thus, the underline was actually on the next line (there's a lesson here about mixing units). Once that was resolved (by making the \parbox 1.2 inches wide), just adding extra \parbox invocations took care of it, in the form of the macro \boxcol.

\documentclass[12pt]{article}
\usepackage{amsmath, amsfonts, amssymb, array}
\usepackage{graphicx, fancyhdr, color}
\usepackage[bottom=1in, top=1in, left=.5in, right=.5in]{geometry}
\usepackage{paralist}
\usepackage{tabto}

\renewcommand{\familydefault}{\sfdefault}

\pagestyle{fancy}
\fancypagestyle{firststyle} % This ensures that the header is only on page one
{
\fancyhead{}
\fancyhead[L]{{\large Week of:\underline{\hspace{5cm}} \hspace{1cm} \textbf{B:} \hspace{1.5cm} \textbf{L:} \hspace{1.5cm} \textbf{D:} \hspace{1.5cm} \fbox{Cost: \hspace{2cm}}}}}
\renewcommand{\headrulewidth}{0pt} % Removes the horizontal bar across the header
\fancyfoot{}
\fancyfoot[C]{\thepage \\ \small{rev: \today}}

\newcommand\mydiv[2]{%
$\strut#1$\kern.25em\smash{\raise.3ex\hbox{$\big)$}}$\mkern-8mu
 \overline{\enspace\strut#2}$}

\newenvironment{tabbedenum}[1]
 {\NumTabs{#1}\inparaenum\let\latexitem\item
  \def\item{\def\item{\tab\latexitem}\latexitem}}
 {\endinparaenum}

\setlength{\parindent}{0mm}

\def\boxcol{%
\parbox[t][1.5in]{1.2in}{
\begin{itemize} \itemsep-15pt
 \renewcommand{\labelitemi}{$\Box$} 
 \item  \underline{\hspace{2cm}} \\
 \item  \underline{\hspace{2cm}} \\
 \item  \underline{\hspace{2cm}} \\
 \item  \underline{\hspace{2cm}} \\
 \item  \underline{\hspace{2cm}} 
\end{itemize}
}}
\begin{document}
\thispagestyle{firststyle}

\setlength{\fboxrule}{1.5pt}

\framebox[2.5in][l]{ \parbox[t][1.5in]{1in}{} }
\framebox[4in][l]{\boxcol\boxcol\boxcol }
\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.