From 2855cef45bb7de3c22dcaa4318ec74d89232024d Mon Sep 17 00:00:00 2001 From: david Date: Thu, 10 Sep 2026 10:51:53 -0500 Subject: [PATCH] add text box for meal planner --- meal-planner.tex | 56 +++++++++++++++++++++++++----------------------- render.sh | 17 ++++++++------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/meal-planner.tex b/meal-planner.tex index 230fe93..a82e836 100644 --- a/meal-planner.tex +++ b/meal-planner.tex @@ -5,38 +5,40 @@ \hfuzz=\maxdimen \hbadness=10000 \documentclass{article} -\usepackage{xcolor,environ,lipsum,fontawesome5,calc,tikz,tabularray,graphicx,microtype,lmodern} +\usepackage{xcolor,environ,lipsum,fontawesome5,calc,tikz,tabularray,graphicx,microtype,lmodern,hyperref} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[% - papersize={5.5in,8.5in}, - margin=15mm, - top=5mm, - bottom=5mm + papersize={5.5in,8.5in}, + margin=15mm, + top=5mm, + bottom=5mm ]{geometry} -\newcommand{\paste}{ - \noindent - \begin{tblr}{width = \textwidth, - vline{2,3} = {3,6,9,12,15,18,21}{solid}, % vertical lines - hline{2,5,8,11,14,17,20} = {2}{dotted}, % horizontal lines above Lunch - hline{3,4,6,7,9,10,12,13,15,16,18,19,21,22} = {solid}, % horizontal lines above text boxes - row{3,6,9,12,15,18,21} = {4.6em}, % the text boxes to write in - columns = {0.3\textwidth,c}} - \\Breakfast & Lunch & Supper\\ \\ - \\Breakfast & Lunch & Supper\\ \\ - \\Breakfast & Lunch & Supper\\ \\ - \\Breakfast & Lunch & Supper\\ \\ - \\Breakfast & Lunch & Supper\\ \\ - \\Breakfast & Lunch & Supper\\ \\ - \\Breakfast & Lunch & Supper\\ \\ - \end{tblr} +\newcounter{mealday} + +\newcommand{\paste}{\noindent\begin{tblr}{width = \textwidth, + vline{2,3} = {3,6,9,12,15,18,21}{solid}, % vertical lines + hline{2,5,8,11,14,17,20} = {2}{dotted}, % horizontal lines above Lunch + hline{3,4,6,7,9,10,12,13,15,16,18,19,21,22} = {solid}, % horizontal lines above text boxes + row{3,6,9,12,15,18,21} = {4.6em}, % the text boxes to write in + columns = {0.3\textwidth,c}} + \\Breakfast & Lunch & Supper\\ \stepcounter{mealday}\TextField[name=B\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=L\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=S\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{}\\ + \\Breakfast & Lunch & Supper\\ \stepcounter{mealday}\TextField[name=B\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=L\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=S\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{}\\ + \\Breakfast & Lunch & Supper\\ \stepcounter{mealday}\TextField[name=B\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=L\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=S\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{}\\ + \\Breakfast & Lunch & Supper\\ \stepcounter{mealday}\TextField[name=B\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=L\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=S\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{}\\ + \\Breakfast & Lunch & Supper\\ \stepcounter{mealday}\TextField[name=B\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=L\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=S\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{}\\ + \\Breakfast & Lunch & Supper\\ \stepcounter{mealday}\TextField[name=B\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=L\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=S\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{}\\ + \\Breakfast & Lunch & Supper\\ \stepcounter{mealday}\TextField[name=B\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=L\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{} & \TextField[name=S\themealday,width=\linewidth,height=4.4em,multiline=true,bordercolor=,backgroundcolor=]{}\\ + \end{tblr} } \begin{document} -\pagestyle{empty} -{\fontfamily{lmss}\selectfont -\paste -\break -\paste -}\end{document} \ No newline at end of file + \begin{Form} + \pagestyle{empty} + {\fontfamily{lmss}\selectfont + \paste\\ + \paste + } + \end{Form} +\end{document} \ No newline at end of file diff --git a/render.sh b/render.sh index c9ce9ed..fa5665b 100755 --- a/render.sh +++ b/render.sh @@ -2,6 +2,7 @@ cd "$(dirname "$0")" # these are so that later it can be edited through the web on gitea and automagically recompile without having to run anything on the webserver manually. MUST be commented out when modifying/running locally. I'm not gonna maintain two copies just for that automation, especially while I'm still actively creating stuff +#git stash #git fetch --all #git reset --hard origin/master @@ -10,15 +11,15 @@ pdflatex -file-line-error -interaction nonstopmode -draftmode -shell-escape -job pdflatex -file-line-error -interaction nonstopmode -shell-escape -jobname=Recipes main.tex mv -v -t /home/david/fileshare/LaTeX/Recipes Recipes.pdf -#printf "\n-_-_-_-_-_-_-_-_- Meal Planner -_-_-_-_-_-_-_-_-\n" -#pdflatex -file-line-error -interaction nonstopmode -draftmode -shell-escape -jobname="Meal Planner" meal-planner.tex -#pdflatex -file-line-error -interaction nonstopmode -shell-escape -jobname="Meal Planner" meal-planner.tex -#mv -v -t /home/david/fileshare/LaTeX/Recipes "Meal Planner.pdf" +printf "\n-_-_-_-_-_-_-_-_- Meal Planner -_-_-_-_-_-_-_-_-\n" +pdflatex -file-line-error -interaction nonstopmode -shell-escape -jobname="Meal Planner" meal-planner.tex +qpdf "Meal Planner.pdf" --pages . 2-3 -- --replace-input # easier than trying to figure out how to remove the blank pages it auto-creates lol +mv -v -t /home/david/fileshare/LaTeX/Recipes "Meal Planner.pdf" -#printf "\n-_-_-_-_-_-_-_-_- Shopping list -_-_-_-_-_-_-_-_-\n" -#pdflatex -file-line-error -draftmode -shell-escape -jobname="Shopping List" shopping-list.tex -#pdflatex -file-line-error -shell-escape -jobname="Shopping List" shopping-list.tex -#mv -v -t /home/david/fileshare/LaTeX/Recipes "Shopping List.pdf" +printf "\n-_-_-_-_-_-_-_-_- Shopping list -_-_-_-_-_-_-_-_-\n" +pdflatex -file-line-error -draftmode -shell-escape -jobname="Shopping List" shopping-list.tex +pdflatex -file-line-error -shell-escape -jobname="Shopping List" shopping-list.tex +mv -v -t /home/david/fileshare/LaTeX/Recipes "Shopping List.pdf" rm *.aux *.out *.log *.toc *.fls *.fdb_latexmk